ItemCollection.TryGetType 方法 (String, String, Boolean, EdmType%)

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

使用指定的类型名称和命名空间名称从此项集合中返回一个 EdmType 对象。

命名空间:  System.Data.Entity.Core.Metadata.Edm
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
Public Function TryGetType ( _
    name As String, _
    namespaceName As String, _
    ignoreCase As Boolean, _
    <OutAttribute> ByRef type As EdmType _
) As Boolean
用法
Dim instance As ItemCollection 
Dim name As String 
Dim namespaceName As String 
Dim ignoreCase As Boolean 
Dim type As EdmType 
Dim returnValue As Boolean 

returnValue = instance.TryGetType(name, _
    namespaceName, ignoreCase, type)
public bool TryGetType(
    string name,
    string namespaceName,
    bool ignoreCase,
    out EdmType type
)
public:
bool TryGetType(
    String^ name, 
    String^ namespaceName, 
    bool ignoreCase, 
    [OutAttribute] EdmType^% type
)
member TryGetType : 
        name:string * 
        namespaceName:string * 
        ignoreCase:bool * 
        type:EdmType byref -> bool
public function TryGetType(
    name : String, 
    namespaceName : String, 
    ignoreCase : boolean, 
    type : EdmType
) : boolean

参数

  • ignoreCase
    类型:System.Boolean
    如果执行不区分大小写的搜索,则为 true;否则为 false。

返回值

类型:System.Boolean
如果存在与搜索条件匹配的类型,则为 true;否则为 false。

请参阅

参考

ItemCollection 类

TryGetType 重载

System.Data.Entity.Core.Metadata.Edm 命名空间