Please help with conversion into an interface
-
Hi, I was wondering if anyone knows how to convert a DataGridColumnStyle type to an interface type. I am converting some code from C# to VB.net and this one error is hanging up my progress. The code in C# works: commonCol=col as ICommonColumnStyle; But whenI try to convert it to VB.net: commonCol=Ctype(col, ICommonColumnStyle) It gives me a runtime error saying that the specified cast is not valid. I have tried try commonCol = Ctype(col, ICommonColumnStyle) catch commonCol = Nothing end try that will eliminate the error, but the problem of col never being converted exists, it will always set commonCol = nothing and I need it to convert the value. Any ideas on this would be greatly appreciated. Thank you very much and have a good one!! eatwork