1. Back To Blog

C# interview question: - What are 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

Shiv Prasad Koirala

Visit us @ www.questpond.com or call us at 022-66752917... read more

We are on Social