473,395 Members | 1,401 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,395 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 22592
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.