Difference between two different ways of doing things 
Author Message
 Difference between two different ways of doing things

Hi,
Need some help. I have seen both of these

typeof(System.String) and
System.Type.GetType("System.String")

Which is better method of getting a Type? I am studying for C# exam (316)
when this came up.

--
Alok Joshi



Thu, 28 Apr 2005 01:35:09 GMT  
 Difference between two different ways of doing things
Alok,

Quote:
>typeof(System.String) and
>System.Type.GetType("System.String")

>Which is better method of getting a Type?

Depends on what you're doing. typeof() gives you compile-time type
checking, which is a good thing.

Mattias

===

http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.



Thu, 28 Apr 2005 02:56:34 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. two com exes running on two different machines

2. Two labels with two different fonts!

3. Utilizing ODBC to communicate two different processes on different machines

4. Different ways of implementing a 2d array

5. Different ways of licensing class libraries

6. Two ways to write multi-statement macros

7. For those who like doing things backwards

8. Doing things with the printer !!!

9. doing graphical thing on the dos prompt

10. Simpler way of doing things in VC7 ATL?

11. ATL and doing things the wrong way

12. _open not doing the right thing

 

 
Powered by phpBB® Forum Software