Partial type

image_pdfimage_print
   
 

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();
        }
    }
}

    


This entry was posted in Data Types. Bookmark the permalink.