473,396 Members | 1,805 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,396 software developers and data experts.

Refering to a type staticly

Hi all,

I am curious if there is a way to refer to a class type without having to
create an instance of a type, and to GetType() on it. For instance, in Java,
I could do something like

Class classType = String.class;

I assume that there is something similar in C#?

Thanks,

Dave.
Nov 15 '05 #1
1 988

Type type = typeof(string);

"Dave Rudolf" <da****************@hotmail.com> wrote in message
news:vp************@corp.supernews.com...
Hi all,

I am curious if there is a way to refer to a class type without having to
create an instance of a type, and to GetType() on it. For instance, in Java, I could do something like

Class classType = String.class;

I assume that there is something similar in C#?

Thanks,

Dave.

Nov 15 '05 #2

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

Similar topics

5
by: Rajan Moorjaney | last post by:
Hello, I know that I can get the refering URL using Request.ServerVariables("HTTP_REFERER") but how can I get the URL if the page no longer exists and so is being redirected to '404 File not...
2
by: Dave | last post by:
Hello, template <class T> class weak_ptr { weak_ptr(weak_ptr const &r); }; In the code above, a parameter of type weak_ptr is declared. How is this possible? weak_ptr is not a type, it's...
6
by: news.versatel.de | last post by:
Hello NG, I am using javascript to open a new window like this: printpreview=window.open('printview.php','printprev','width=600,height=600'); The new window has a layer called preview: ...
5
by: Rick | last post by:
Hi, Another question for today, it's about structs refering to each other. I tried this code struct List; struct child { struct List parent; };
59
by: Michael C | last post by:
eg void DoIt() { int i = FromString("1"); double d = FromString("1.1"); } int FromString(string SomeValue) {
2
by: hugh welford | last post by:
Hi, Can anyone tell me how to grab the refering URL of a visitor to my site from another site ( I have tried Request.ServerVariables (HTTP_referer) which returns a blank value, although it seems...
5
by: Alex Maghen | last post by:
I frequently find myself wanting to insert some basic client-side JavaScript functions in the page of an ASPX of mine. But I find it so frustrating that I have to actually contruct my JavaScript in...
1
by: Sarwan | last post by:
Hello everybody I have a solution in which there is an unmanaged MFC application. Then i added a new managed .Net Windows Form application. I was trying to refer an header file of unmanaged...
10
by: safaci2000 | last post by:
Hi all, I have a DLL that I need to access. I've managed to load it and unload it successfully. The compiler is happy no complaints or warning. I need to refer to a class object that was...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.