Sunday, July 26, 2009

C#.Net Partial method return types

One of the limitation for the partial methods is, they cannot return a type.
Always the return type is void

The reason is the partial methods may or may not contain an implementation. So there should not be code that is using the return parameter from the partial method. i.e there should not be any dependency on those.
These partial methods should not contain out parameters also.The reason is same.
The Compiler won't compile the partial methods at all if there is no implementation.

No comments:

Post a Comment