CodeFile1.cs
class MainClass
{
static void Main()
{
// 出力値:1:partial1 2:partial2
SampleClass sample = new SampleClass();
}
}
CodeFile2.cs
using System;
partial class SampleClass
{
int n1 = 1;
string s1 = "partial1";
public SampleClass()
{
Console.WriteLine("{0}:{1}", n1, s1);
Console.WriteLine("{0}:{1}", n2, s2);
}
}
CodeFile3.cs
partial class SampleClass
{
int n2 = 2;
string s2 = "partial2";
}
0 コメント:
コメントを投稿