Csharp/C Sharp/Data Types/Partial Type
Версия от 15:31, 26 мая 2010; (обсуждение)
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();
}
}
}