我正在使用部分类将某些功能分割到2个文件中,但是出现了一个错误。我做错了什么?
A1.cs:
private partial class A
{
private string SomeProperty { get { return "SomeGeneratedString"; } }
}
A2.cs:
private partial class A
{
void SomeFunction()
{
//trying to access this.SomeProperty produces the following compiler error, at least with C# 2.0
//error CS0117: 'A' does not contain a definition for 'SomeProperty'
}
}