i have searched everywhere but cannot find a solution, so I am asking the question here. I have a procedure which takes a parameter of a string enum type (which has been created in a static class), but I keep getting string cannot be converted to mytype. Which i find odd as I am actually sending it one of its type. Can someone please help me understand what I am missing. I understand the error but I do not get it as I am passing through its type.
Below is the static class type created in c#
public static class ExportedType
{
public const string CSV = "csv";
public const string XML = "xml";
}
I create a procedure in vb.net
Private Sub ExportData(exportedType As ExportedType)
'stuff in here
End Sub
I try to call it
ExportData(ExportedType.XML)
and i keep getting value type string cannot be converted to ExportedType
My guess is I am missing something vital, but can some try to explain for me.
Thanks