Verifies whether the element has a name and returns the name if it exists.
Namespace: Microsoft.VisualStudio.Modeling
Assembly: Microsoft.VisualStudio.Modeling.Sdk (in Microsoft.VisualStudio.Modeling.Sdk.dll)
Syntax
'Declaration
Public Shared Function TryGetName ( _
element As ModelElement, _
<OutAttribute> ByRef name As String _
) As Boolean
'Usage
Dim element As ModelElement
Dim name As String
Dim returnValue As Boolean
returnValue = DomainClassInfo.TryGetName(element, _
name)
public static bool TryGetName(
ModelElement element,
out string name
)
public:
static bool TryGetName(
ModelElement^ element,
[OutAttribute] String^% name
)
public static function TryGetName(
element : ModelElement,
name : String
) : boolean
Parameters
element
Type: Microsoft.VisualStudio.Modeling.ModelElementThe element.
name
Type: System.String%The name of the element.
Return Value
Type: System.Boolean
true if the element has a name; otherwise, false.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.