Partial type : Partial Type « Data Types « C# / C Sharp






Partial type

 

using System;
using System.Collections.Generic;
using System.Text;

namespace PartialTypes
{
    // MyClass_Private.cs
    namespace PartialTypes
    {
        public partial class MyClass
        {
            // Private field data.
            private string someStringData;

            // All private helper members.
            public static void SomeStaticHelper() { }
        }
    }
}


using System;
using System.Collections.Generic;
using System.Text;

namespace PartialTypes
{
    // MyClass_Public.cs
    namespace PartialTypes
    {
        public partial class MyClass
        {
            // Constructors.
            public MyClass() { }

            // All public members.
            public void MemberA() { }
            public void MemberB() { }
        }
    }
}


using System;
using System.Collections.Generic;
using System.Text;

namespace PartialTypes
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.ReadLine();
        }
    }
}

 








Related examples in the same category