ModulePageIdentifierAttribute(String) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the ModulePageIdentifierAttribute class.
public:
ModulePageIdentifierAttribute(System::String ^ guid);
public ModulePageIdentifierAttribute (string guid);
new Microsoft.Web.Management.Client.ModulePageIdentifierAttribute : string -> Microsoft.Web.Management.Client.ModulePageIdentifierAttribute
Public Sub New (guid As String)
Parameters
- guid
- String
The string representation of a GUID.
Examples
The following example creates a ModulePageIdentifierAttribute object and sends the value of the Guid property to the trace listener.
protected override Guid PreferenceKey {
get {
object[] attrs = GetType().
GetCustomAttributes(
typeof(ModulePageIdentifierAttribute),
false);
if (attrs.Length > 0) {
ModulePageIdentifierAttribute
modulePageIdentifierAttr =
(ModulePageIdentifierAttribute)attrs[0];
return modulePageIdentifierAttr.Guid;
}
return Guid.Empty;
}
}