>i cant get the type by using this statement
>Type t = Type.GetType(System.Data.OleDb.OleDbCommand);
>it return null to me
That code shouldn't even compile. I assume you had the type name as a
string.
The reason it returns null is that Type.GetType only looks in
Mscorlib.dll and the calling assembly by default. To make it look in
some other assembly (System.Data.dll in this case) you have to pass it
the full type and assembly name
"System.Data.OleDb.OleDbCommand, System.Data, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
But if you have System.Data.dll referenced, it's easier to just use
the typeof() operator.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.