DbProviderFactories.GetFactory Method (DbConnection)缺失

5
根据MSDN,.NET 4中有一个GetFactory(DbConnection)的重载。然而,我无法调用它-在编译时失败并报错:
error BC30518: Overload resolution failed because no accessible 'GetFactory' can be called with these arguments:
    'Public Shared Function GetFactory(providerRow As System.Data.DataRow) As System.Data.Common.DbProviderFactory': Value of type 'System.Data.Common.DbConnection' cannot be converted to 'System.Data.DataRow'.
    'Public Shared Function GetFactory(providerInvariantName As String) As System.Data.Common.DbProviderFactory': Value of type 'System.Data.Common.DbConnection' cannot be converted to 'String'.

我的.NET框架有问题还是文档中有错别字?

+1 确认,我使用 .NET 4 也是这样。 - Tim Schmelter
1个回答

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接