Click here to Skip to main content
16,016,712 members
Home / Discussions / C#
   

C#

 
AnswerRe: What is the proper way to remove a control from a panel? Pin
vektuz8-Dec-03 0:03
vektuz8-Dec-03 0:03 
AnswerRe: What is the proper way to remove a control from a panel? Pin
Heath Stewart8-Dec-03 2:50
protectorHeath Stewart8-Dec-03 2:50 
GeneralRe: What is the proper way to remove a control from a panel? Pin
vektuz8-Dec-03 8:35
vektuz8-Dec-03 8:35 
GeneralRe: What is the proper way to remove a control from a panel? Pin
vektuz8-Dec-03 8:48
vektuz8-Dec-03 8:48 
GeneralRe: What is the proper way to remove a control from a panel? Pin
Heath Stewart8-Dec-03 9:22
protectorHeath Stewart8-Dec-03 9:22 
GeneralLoading a class at runtime from an assembly Pin
AJ1237-Dec-03 22:53
AJ1237-Dec-03 22:53 
GeneralRe: Loading a class at runtime from an assembly Pin
Tim Friesen8-Dec-03 1:29
Tim Friesen8-Dec-03 1:29 
GeneralRe: Loading a class at runtime from an assembly Pin
Heath Stewart8-Dec-03 2:46
protectorHeath Stewart8-Dec-03 2:46 
Extending on what Tim said, the Type is unique to each class, enum, delegate, or struct in an assembly. It contains the namespace and class name, the assembly which contains the type, and a few other pieces of information (including version, culture, and public key token (if signed - which it should be for better applications and versioning control)). This takes the place of GUIDs and ProgIDs.

Besides Activator.CreateInstance, you can have more control over type loading by using the static method Type.GetType. For instance, say in your application's .config file (yourapp.exe.config, which takes the place of the registry which you're not supposed to use in .NET unless necessary) you have a partial type string like "MyNamespace.MyType, MyFirstAssembly" (version information and other stuff can be left out as long as the CLR can resolve "MyFirstAssembly"). If you want to get the type before instantiating it, you can read the value out of the configuration file and call Type.GetType("MyNamespace.MyType, MyFirstAssembly"). That returns a Type which you can use to create an instance of use Reflection to get other information (such as whether or not it implements a particular plug-in interface you require before instantiating, although you could get this by using the is keyword after instantiating, but perhaps instantiating it is pointless to you if it doesn't implement a particular interface).

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
QuestionVS.NET rebuilds solution constantly? Pin
phimix7-Dec-03 22:16
phimix7-Dec-03 22:16 
AnswerRe: VS.NET rebuilds solution constantly? Pin
Colin Angus Mackay8-Dec-03 1:37
Colin Angus Mackay8-Dec-03 1:37 
AnswerRe: VS.NET rebuilds solution constantly? Pin
Heath Stewart8-Dec-03 2:41
protectorHeath Stewart8-Dec-03 2:41 
GeneralRe: VS.NET rebuilds solution constantly? Pin
phimix8-Dec-03 21:59
phimix8-Dec-03 21:59 
AnswerRe: VS.NET rebuilds solution constantly? Pin
Mauricio Ritter8-Dec-03 4:02
Mauricio Ritter8-Dec-03 4:02 
GeneralRe: VS.NET rebuilds solution constantly? Pin
phimix8-Dec-03 4:43
phimix8-Dec-03 4:43 
QuestionWhy C# instead of C++ and MFC? Pin
d00_ape7-Dec-03 22:08
sussd00_ape7-Dec-03 22:08 
AnswerRe: Why C# instead of C++ and MFC? Pin
Colin Angus Mackay8-Dec-03 1:31
Colin Angus Mackay8-Dec-03 1:31 
AnswerRe: Why C# instead of C++ and MFC? Pin
Heath Stewart8-Dec-03 2:37
protectorHeath Stewart8-Dec-03 2:37 
GeneralRe: Why C# instead of C++ and MFC? Pin
d00_ape8-Dec-03 11:43
sussd00_ape8-Dec-03 11:43 
GeneralWeb Service hosted on Win2003 with Sharepoint 2003 Pin
Pilgrim7-Dec-03 21:29
Pilgrim7-Dec-03 21:29 
GeneralRe: Web Service hosted on Win2003 with Sharepoint 2003 Pin
Heath Stewart8-Dec-03 2:31
protectorHeath Stewart8-Dec-03 2:31 
QuestionDistribute MSDE with your C# Application? Pin
Dato7-Dec-03 21:00
Dato7-Dec-03 21:00 
AnswerRe: Distribute MSDE with your C# Application? Pin
Heath Stewart8-Dec-03 2:27
protectorHeath Stewart8-Dec-03 2:27 
GeneralC# New Project Dialog Box Pin
Member 7525907-Dec-03 12:48
Member 7525907-Dec-03 12:48 
GeneralRe: C# New Project Dialog Box Pin
Heath Stewart8-Dec-03 2:24
protectorHeath Stewart8-Dec-03 2:24 
GeneralRe: C# New Project Dialog Box Pin
Member 7525908-Dec-03 9:21
Member 7525908-Dec-03 9:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.