|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Type.GetType()After the following line:
Type myType1 = Type.GetType("System.Drawing.Color"); myType1 is "undefined". Why is this? I expected it to be type System.Drawing.Color. Many thanks. Considering specifying the assembly name.
System.Drawing.Color, System.Drawing Karl Show quoteHide quote "Andrew Chalk" <ach***@magnacartasoftware.com> wrote in message news:O6FxRhqNGHA.2912@tk2msftngp13.phx.gbl... > After the following line: > > Type myType1 = Type.GetType("System.Drawing.Color"); > > myType1 is "undefined". Why is this? I expected it to be type > System.Drawing.Color. > > Many thanks. > Thanks. Same result.
Is there any other way to check that type of an object? Or to manually construct a Type to test an object.GetType() against? - A "Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME Show quoteHide quote net> wrote in message news:%23OSOYEuNGHA.2696@TK2MSFTNGP14.phx.gbl... > Considering specifying the assembly name. > > System.Drawing.Color, System.Drawing > > Karl > -- > http://www.openmymind.net/ > > > > "Andrew Chalk" <ach***@magnacartasoftware.com> wrote in message > news:O6FxRhqNGHA.2912@tk2msftngp13.phx.gbl... >> After the following line: >> >> Type myType1 = Type.GetType("System.Drawing.Color"); >> >> myType1 is "undefined". Why is this? I expected it to be type >> System.Drawing.Color. >> >> Many thanks. >> > > How odd, it worked for me. You might need to specify the fully quantified
name if it's sitting in the GAC, meaning passing in a public token, culture, version.... you can check what type an object is via the "is" operator if (myObject is Drawing) { } Karl Show quoteHide quote "Andrew Chalk" <ach***@magnacartasoftware.com> wrote in message news:ZxIKf.50956$dW3.2600@newssvr21.news.prodigy.com... > Thanks. Same result. > > Is there any other way to check that type of an object? Or to manually > construct a Type to test an object.GetType() against? > > - A > > "Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME > net> wrote in message news:%23OSOYEuNGHA.2696@TK2MSFTNGP14.phx.gbl... >> Considering specifying the assembly name. >> >> System.Drawing.Color, System.Drawing >> >> Karl >> -- >> http://www.openmymind.net/ >> >> >> >> "Andrew Chalk" <ach***@magnacartasoftware.com> wrote in message >> news:O6FxRhqNGHA.2912@tk2msftngp13.phx.gbl... >>> After the following line: >>> >>> Type myType1 = Type.GetType("System.Drawing.Color"); >>> >>> myType1 is "undefined". Why is this? I expected it to be type >>> System.Drawing.Color. >>> >>> Many thanks. >>> >> >> > >
C#/ASP.NET 2.0 - Convert HTML Table to DataGrid/Source
How to set property "ReadOnly" on all TextBoxes on a WebForm Composite Server Control and DefaultValue Attribute The case of the crazy reseting dropdowns :-( Please help! Looking for a book on writing ASP.NET Controls with VB.NET Row count for query through SqlDataSource and GridView using ASPNET objects in custom webcontrol general request about links CompileWith Indent Items in ASP:ListBox? |
|||||||||||||||||||||||