0

This probably has already been asked, sorry, but is C# an object-oriented language like Java? It's been a while since I worked in C++, but I just wanted to check: can I make multiple classes and use them as objects in the same Visual Studio project? And would these be .cs files? e.g. Playback_Adjuster.cs, Gesture_Control.cs, Audio_File.cs?

Thanks!

1
  • You can use separate file for each class, but you may also put many classes into one file. It's up to you. You can also "distribute"/"slice" one class to many files by using partial class statement. Using one class for Form/Window can put interface related objects in one and logic in another file. Commented Dec 6, 2012 at 6:17

1 Answer 1

1

Yes, C# is fully Object Oriented. You can read about it here: http://msdn.microsoft.com/en-us/library/dd460654.aspx

Additionally, C# files typically have a .cs extension, as you mentioned. You can use multiple classes in the same project - just like other OO languages. In my experience, I've found C# and Java to be actually quite similar in many respects - with differences, of course.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.