Gets the attribute and throws the exception if the attribute is empty or a null reference (Nothing in Visual Basic).
Namespace: Microsoft.VisualStudio.Package
Assembly: MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)
Syntax
'宣言
Public Function GetMetadataAndThrow ( _
attributeName As String, _
exception As Exception _
) As String
'使用
Dim instance As ProjectElement
Dim attributeName As String
Dim exception As Exception
Dim returnValue As String
returnValue = instance.GetMetadataAndThrow(attributeName, _
exception)
public string GetMetadataAndThrow(
string attributeName,
Exception exception
)
public:
String^ GetMetadataAndThrow(
String^ attributeName,
Exception^ exception
)
public function GetMetadataAndThrow(
attributeName : String,
exception : Exception
) : String
Parameters
attributeName
Type: System.StringThe name of the attribute.
exception
Type: System.ExceptionThe exception to be thrown if the attribure is not found or empty.
Return Value
Type: System.String
Returns the value of the attribute.
Permissions
- 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.