我试图从另一个分支拉入我的分支,但出现合并错误。当我尝试解决它们时,我从 SourceTree 收到此错误:“无法更新一个或多个文件,请检查是否没有其他应用程序锁定您的文件”。但我确定没有其他应用程序使用我的文件,知道如何修复吗?
我有这么一小段代码:
public static I CreateInstance<I>(string myClassName) where I : class
{
Debug.Log("Instance: " + (Activator.CreateInstance(null, myClassName) as I));
return Activator.CreateInstance(null, myClassName) as I;
}
void Test(string testName)
{
testName = "TestProvider";
var data = CreateInstance<IProviderInitializer>(testName).GetProviderInfo();
Debug.Log("Data: " + data);
}
Run Code Online (Sandbox Code Playgroud)
问题是我得到了 NULL Reference Exception,但我不知道为什么。