Finally figured this out:
VB.NET Syntax:
Dim objCopyright As AssemblyCopyrightAttribute = CType
(AssemblyCopyrightAttribute.GetCustomAttribute
(System.Reflection.Assembly.GetExecutingAssembly, GetType
(AssemblyCopyrightAttribute)), AssemblyCopyrightAttribute)
C# Syntax:
AssemblyCopyrightAttribute objCopyright =
(AssemblyCopyrightAttribute)
AssemblyCopyrightAttribute.GetCustomAttribute
(System.Reflection.Assembly.GetExecutingAssembly() , typeof
(AssemblyCopyrightAttribute));
J. Ptak
>-----Original Message-----
>Hey all,
>
>Can anyone show me the proper C# syntax necessary to read
>the attribute fields from the AssemblyInfo.cs file? I
>have the following in VB.Net, but so far am unsuccessful
>in translating the code to C#:
>
>Dim objCopyright As AssemblyCopyrightAttribute = CType
>(AssemblyCopyrightAttribute.GetCustomAttribute
>(System.Reflection.Assembly.GetExecutingAssembl y, GetType
>(AssemblyCopyrightAttribute)), AssemblyCopyrightAttribute)
>
>Dim objProduct As AssemblyProductAttribute = CType
>(AssemblyProductAttribute.GetCustomAttribute
>(System.Reflection.Assembly.GetExecutingAssembl y, GetType
>(AssemblyProductAttribute)), AssemblyProductAttribute)
>
>Thanks!
>
>J. Ptak
>
>.
>
|