Monday, January 9, 2012

C# interview question: - Explain partial methods in partial classes of C# and .NET?

Partial methods are important components of partial classes. Read and click on the following link in case you are new to partial classes.

Partial methods helps us to define a method definition in one of the physical files and we can implement that method in the other physical files as shown in the below figure.

In the below figure you can see we have defined “Validate” method in “Customer1.cs” and this validate method is implemented in “Customer2.cs”. Please note the partial keywords attached to both of these methods.

Figure: -
Also see the following video on Partial methods: -



Click for more learning stuffs on c# interview questions and answers

Regards,

Click it for author’s more training stuffs on Most asked c# interview questions

1 comment:

Rajeswari murugan said...

nice post...
this post is really helpful for students...i can learn more knowledge..i hope to continue this work...Job Interview Tips