Click to See Complete Forum and Search --> : Converting C# to VB Question


the_future21
09-19-2006, 12:47 PM
Dim p As System.Security.Principal.WindowsPrincipal = CType(ConversionHelpers.AsWorkaround(System.Threading.Thread.CurrentPrincipal, GetType(System.Security.Principal.WindowsPrincipal)), System.Security.Principal.WindowsPrincipal)



I converted this piece of code from C# to VB and I am getting an error ConversionHelpers not Declared. How can i fix this???

sirpelidor
09-19-2006, 01:16 PM
try this (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=346174&SiteID=1) see if it helps.

the_future21
09-19-2006, 02:27 PM
i added the namespace in the webconfig file and there is still a blue line under it sayin its not declared. Im not for sure were to put the assembly.

sirpelidor
09-19-2006, 04:23 PM
i added the namespace in the webconfig file

webconfig file!? I take that you are using 2.0. Have you tried add that namespace manually for the code inline?