Equivalent to C# typeof()?

  • Thread starter Thread starter Steve Brecher
  • Start date Start date
S

Steve Brecher

AppSettingsReader.GetValue method:

Public Function GetValue( _
ByVal key As String, _
ByVal type As Type _
) As Object

In C#, I would invoke this, e.g., with:
myConfigReader.GetValue("param", typeof(string))

What would I pass for the type parameter in VB.NET?
 
Steve,

myConfigReader.GetValue("param", Type.GetType("String"))

HTH,

Raymond Lewallen
 
Raymond Lewallen said:
myConfigReader.GetValue("param", Type.GetType("String"))

That was a good hint; I'll use:

myConfigReader.GetValue("param", GetType(String))
 
Back
Top