简体   繁体   English

如何使用C#作为面向对象的设计?

[英]How to use C# as Object Oriented Design?

This probably has already been asked, sorry, but is C# an object-oriented language like Java? 抱歉,这可能已经被问到了,但是C#是像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? 自从我使用C ++以来已经有一段时间了,但是我只想检查一下:我可以创建多个类并将它们用作同一Visual Studio项目中的对象吗? And would these be .cs files? 这些是.cs文件吗? eg Playback_Adjuster.cs, Gesture_Control.cs, Audio_File.cs? 例如Playback_Adjuster.cs,Gesture_Control.cs,Audio_File.cs?

Thanks! 谢谢!

Yes, C# is fully Object Oriented. 是的,C#是完全面向对象的。 You can read about it here: http://msdn.microsoft.com/en-us/library/dd460654.aspx 您可以在此处阅读有关内容: http : //msdn.microsoft.com/zh-cn/library/dd460654.aspx

Additionally, C# files typically have a .cs extension, as you mentioned. 另外,正如您提到的,C#文件通常具有.cs扩展名。 You can use multiple classes in the same project - just like other OO languages. 您可以在同一项目中使用多个类-就像其他OO语言一样。 In my experience, I've found C# and Java to be actually quite similar in many respects - with differences, of course. 根据我的经验,我发现C#和Java实际上在很多方面都非常相似-当然有所不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM