How are partial methods used in C# 3.0?

前端 未结 5 1134
终归单人心
终归单人心 2020-12-31 02:57

I have read about partial methods in the latest C# language specification, so I understand the principles, but I\'m wondering how people are actually using them. Is there a

5条回答
  •  情歌与酒
    2020-12-31 03:31

    Here is the best resource for partial classes in C#.NET 3.0: http://msdn.microsoft.com/en-us/library/wa80x488(VS.85).aspx

    I try to avoid using partial classes (with the exception of partials created by Visual Studio for designer files; those are great). To me, it's more important to have all of the code for a class in one place. If your class is well designed and represents one thing (single responsibility principle), then all of the code for that one thing should be in one place.

提交回复
热议问题