Type.GetType() methodhttp://forums.asp.net/t/298291.aspx/1?Type+GetType+methodMon, 04 Aug 2003 13:54:49 -0400298291298291http://forums.asp.net/p/298291/298291.aspx/1?Type+GetType+methodType.GetType() method hi Type represents declarations.So why Type objects only represent some types and not others? This throws Null reference exception Type type=Type.GetType(&quot;System.Data.SqlClient.SqlCommand&quot;); MemberInfo[] memInfo=type.GetMembers(); foreach(MemberInfo mi1 in memInfo) { Console.WriteLine(mi1); } So why do we have a Type object that represents StreamWriter class but we don't have one representing SqlCommand or DataSet class?I actually thought Type object can be created for all types,even user defined types thanx 2003-08-02T20:02:30-04:00298517http://forums.asp.net/p/298291/298517.aspx/1?Re+Type+GetType+methodRe: Type.GetType() method I believe you would need to provide full-qualified name of the assembly where the type is looked for. With the code you sent, you need provide how to locate the System.Data.dll assembly where System.Data namespace resides. StreamWriter worked for you as it is in System.dll assembly and therefore automatically checked when Type.GetType is used. I check the version of System.Data assembly using gacutil and then tried following which worked: <pre class="prettyprint">Type type=Type.GetType(&quot;System.Data.SqlClient.SqlCommand, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null&quot;);</pre> 2003-08-03T10:57:04-04:00298541http://forums.asp.net/p/298291/298541.aspx/1?Re+Type+GetType+methodRe: Type.GetType() method thank you Can you explain what Culture=neutral means? bye 2003-08-03T12:35:33-04:00298569http://forums.asp.net/p/298291/298569.aspx/1?Re+Type+GetType+methodRe: Type.GetType() method Culture is part of assembly's strong name. In this case it means the assembly isn't culture-specific. Docs say about strong-named assemblies: A strong name consists of the assembly's identity its simple text name, version number, and culture information (if provided) plus a public key and a digital signature. It is generated from an assembly file (the file that contains the assembly manifest, which in turn contains the names and hashes of all the files that make up the assembly), using the corresponding private key. Microsoft® Visual Studio® .NET and other development tools provided in the .NET Framework SDK can assign strong names to an assembly. Assemblies with the same strong name are expected to be identical. You can ensure that a name is globally unique by signing an assembly with a strong name. In particular, strong names satisfy the following requirements: Strong names guarantee name uniqueness by relying on unique key pairs. No one can generate the same assembly name that you can, because an assembly generated with one private key has a different name than an assembly generated with another private key. Strong names protect the version lineage of an assembly. A strong name can ensure that no one can produce a subsequent version of your assembly. Users can be sure that a version of the assembly they are loading comes from the same publisher that created the version the application was built with. Strong names provide a strong integrity check. Passing the .NET Framework security checks guarantees that the contents of the assembly have not been changed since it was built. Note, however, that strong names in and of themselves do not imply a level of trust like that provided, for example, by a digital signature and supporting certificate. When you reference a strong-named assembly, you expect to get certain benefits, such as versioning and naming protection. If the strong-named assembly then references an assembly with a simple name, which does not have these benefits, you lose the benefits you would derive from using a strong-named assembly and revert to DLL conflicts. Therefore, strong-named assemblies can only reference other strong-named assemblies. 2003-08-03T13:51:53-04:00299083http://forums.asp.net/p/298291/299083.aspx/1?Re+Type+GetType+methodRe: Type.GetType() method thank you 2003-08-04T12:28:07-04:00