Autor Beitrag
Help_Me
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Mo 03.05.10 19:06 
Hi!
Gibt es eine Möglichkeit, meinen Type zu bekommen, wenn ich den TypeCode hab?
Bisher hab ichs mit einer switch-Abfrage gemacht:
ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
switch (datentyp)
{
    case TypeCode.Boolean:      
         System.Type type = typeof(boolean);
    ...
}

Hätte es aber gerne so, dass ich das nicht für jeden Datentypen machen muss.
Ist das möglich??

Gruß
Greenberet
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 339
Erhaltene Danke: 20

Win 10
C# (VS 2012), C++ (VS 2012/GCC), PAWN(Notepad++), Java(NetBeans)
BeitragVerfasst: Mo 03.05.10 20:47 
Das Ganze ist einacher als du Denkst =)

ausblenden C#-Quelltext
1:
Type type = Type.GetType("System." + datentyp);					
Help_Me Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Mo 03.05.10 22:30 
user profile iconGreenberet hat folgendes geschrieben Zum zitierten Posting springen:
Das Ganze ist einacher als du Denkst =)

Stimmt =)
Danke!