What is partial class?what is its advantage.

What is partial class?what is its advantage.

Partial Class:

  when a class need to be implemented at multiple locations with same class name then those classes need to be declared as "partial".

Example:

public main()
{
    class Test
    {
       -------
       -------
    }

    class Test //error
    {
       -------
       -------
    }
}

public main()
{
    partial class Test
    {
       -------
       -------
    }

    partial class Test //correct 
    {
       -------
       -------
    }
}


By:Nagulmeera Shaik
Date:0000-00-00 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Links

C interview questions and answers for experienced and fresher