C
Carl Fenley
Help a newbie out. I cannot seem to explicitly convert an Object to a
Reflection.AssemblyCompanyAttribute type using DirectCast(). Turning Option
Strict "Off" is not an option.
Here is the Error:
Option Strict On disallows implicit conversions from 'System.Object' to
'System.Reflection.AssemblyCompanyAttribute'.
Here is the code:
Public ReadOnly Property Company() As String Implements
IAssemblyInfo.Company
Get
Dim attrCompany As SR.AssemblyCompanyAttribute
'*** The following line produces the conversion error ***
attrCompany =
Me._assemblyInfo.GetCustomAttributes(GetType(SR.AssemblyCompanyAttribute),
False)(0)
Return attrCompany.Company.ToString
End Get
End Property
Any help is greatly appreciated.
carl
Reflection.AssemblyCompanyAttribute type using DirectCast(). Turning Option
Strict "Off" is not an option.
Here is the Error:
Option Strict On disallows implicit conversions from 'System.Object' to
'System.Reflection.AssemblyCompanyAttribute'.
Here is the code:
Public ReadOnly Property Company() As String Implements
IAssemblyInfo.Company
Get
Dim attrCompany As SR.AssemblyCompanyAttribute
'*** The following line produces the conversion error ***
attrCompany =
Me._assemblyInfo.GetCustomAttributes(GetType(SR.AssemblyCompanyAttribute),
False)(0)
Return attrCompany.Company.ToString
End Get
End Property
Any help is greatly appreciated.
carl