DomainClassInfo.TryGetName(ModelElement, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
检查元素是否具有 name 属性,如果是,则返回其值。
public:
static bool TryGetName(Microsoft::VisualStudio::Modeling::ModelElement ^ element, [Runtime::InteropServices::Out] System::String ^ % name);
public static bool TryGetName (Microsoft.VisualStudio.Modeling.ModelElement element, out string name);
static member TryGetName : Microsoft.VisualStudio.Modeling.ModelElement * string -> bool
Public Shared Function TryGetName (element As ModelElement, ByRef name As String) As Boolean
参数
- element
- ModelElement
Element.
- name
- String
Name 属性值。
返回
如果元素具有 name 属性,则为 True; 否则为 false。
例外
元素为 null。