473,320 Members | 2,035 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Equivalent to C# typeof()?

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?

--
For mail, please use my surname where indicated:
st***@surname.reno.nv.us (Steve Brecher)
Nov 20 '05 #1
6 22588
Steve,

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

HTH,

Raymond Lewallen
Nov 20 '05 #2
gettype

"Steve Brecher" <St***********@see.sig.at.end> wrote in message
news:OK**************@TK2MSFTNGP10.phx.gbl...
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?

--
For mail, please use my surname where indicated:
st***@surname.reno.nv.us (Steve Brecher)

Nov 20 '05 #3
Steve,

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

HTH,

Raymond Lewallen
Nov 20 '05 #4
gettype

"Steve Brecher" <St***********@see.sig.at.end> wrote in message
news:OK**************@TK2MSFTNGP10.phx.gbl...
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?

--
For mail, please use my surname where indicated:
st***@surname.reno.nv.us (Steve Brecher)

Nov 20 '05 #5
Raymond Lewallen <Ra******************@nospam.faa.gov> wrote:
myConfigReader.GetValue("param", Type.GetType("String"))


That was a good hint; I'll use:

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

--
For mail, please use my surname where indicated:
st***@surname.reno.nv.us (Steve Brecher)
Nov 20 '05 #6
Raymond Lewallen <Ra******************@nospam.faa.gov> wrote:
myConfigReader.GetValue("param", Type.GetType("String"))


That was a good hint; I'll use:

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

--
For mail, please use my surname where indicated:
st***@surname.reno.nv.us (Steve Brecher)
Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Mark | last post by:
Is there a way to achieve multithreading in JavaScript? I'm looking to fetch a page into a div while allowing the user to interact with another div. At some point the newly fetched page contents...
3
by: effendi | last post by:
Hi Can any tell me what is the javascript equivalent of CSS border? I would like to change the border of my cell when it is set on focus. I have tried onFocus="style.border='3px'" but it is not...
14
by: horos | last post by:
hey all, I'm a heavy perl user, not so much a java script user, and was wondering... perl has an extremely nice utility called Data::Dumper, which allows you to dump out the contents of an...
7
by: lkrubner | last post by:
The PHP scripting language has the array_unique() function that gets the unique, non-redundant values out of an array. Does Javascript have anything similar?
0
by: Steve Brecher | last post by:
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:...
4
by: Scott Johnson | last post by:
Hi I am converting some code from C# to VB.NET and I have come across a command that I can't find the VB equivalent. The C# command is 'lock' and I think it is used to lock a data type from...
32
by: Andrew Poulos | last post by:
I'm writing some ASP using js and I need to do a case sensitive SQL select. Googling gave me this: SELECT * FROM User WHERE Strcomp("Blue",,vbBinaryCompare)=0 Strcomp is from vbs. Is there a...
5
by: Greg | last post by:
I can see there is no simple way to define a type like just a simple C++ typedef, such as typdef signaltype double; Using #define seems like a bad idea if it works atall. Using a struct...
5
by: Jeff Bigham | last post by:
Hi, I'm trying to write an equivalent to the hasAttribute method that will work with IE 6 and 7. IE 8 finally has this method built in. There is supposed to be a way to do this using the...
6
by: Bob Altman | last post by:
Hi all, What's the C++ equivalent for the VB TypeOf operator. For example: void ReportError(System::Exception^ ex) { // Psuedo-VB syntax if (TypeOf ex Is System::OperationCanceledException)...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.