Click here to Skip to main content
15,892,059 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneraliButton and .NET Pin
poopa10-Apr-04 8:21
poopa10-Apr-04 8:21 
GeneralCreating Round Buttons Pin
Kilhoffer9-Apr-04 13:53
Kilhoffer9-Apr-04 13:53 
GeneralRe: Creating Round Buttons Pin
SJ_Phoenix15-Apr-04 9:46
SJ_Phoenix15-Apr-04 9:46 
GeneralMicrosoft.DirectX.DirectSound recording levels Pin
bobbiek9-Apr-04 3:30
bobbiek9-Apr-04 3:30 
GeneralSerialize PrinterSettings Pin
Dimitris Iliopoulos9-Apr-04 3:14
Dimitris Iliopoulos9-Apr-04 3:14 
GeneralRe: Serialize PrinterSettings Pin
Mazdak9-Apr-04 3:22
Mazdak9-Apr-04 3:22 
Generaldynamic types cast Pin
iZakaroN9-Apr-04 2:53
iZakaroN9-Apr-04 2:53 
GeneralRe: dynamic types cast Pin
Roman Rodov13-Apr-04 15:12
Roman Rodov13-Apr-04 15:12 
You're in luck, there is already a method in the framework that does that.

bool CanCast(Type sourceType, Type destType) 
{
   return destType.IsAssignableFrom(sourceType);
}


not sure what you want to do in the second method because an "object" is a type that ANY object in the framework and in your own class libraries can be casted to. Basically it is pointless to try to cast object type parameter 'val' to the 'castType' and then return an 'object' again. If you wanted to "create" and object of a type that is only known at runtime you can use the Activator class methods to do that.
GeneralRe: dynamic types cast Pin
iZakaroN14-Apr-04 5:08
iZakaroN14-Apr-04 5:08 
GeneralRe: dynamic types cast Pin
Roman Rodov14-Apr-04 15:52
Roman Rodov14-Apr-04 15:52 
GeneralDundas Components Pin
mmikey78-Apr-04 13:21
mmikey78-Apr-04 13:21 
GeneralRe: Dundas Components Pin
Colin Angus Mackay8-Apr-04 14:03
Colin Angus Mackay8-Apr-04 14:03 
GeneralRe: Dundas Components Pin
mmikey78-Apr-04 14:11
mmikey78-Apr-04 14:11 
GeneralRe: Dundas Components Pin
Colin Angus Mackay8-Apr-04 14:26
Colin Angus Mackay8-Apr-04 14:26 
GeneralRe: Dundas Components Pin
mmikey78-Apr-04 14:32
mmikey78-Apr-04 14:32 
GeneralRe: Dundas Components Pin
Colin Angus Mackay8-Apr-04 14:49
Colin Angus Mackay8-Apr-04 14:49 
GeneralRead a COleDateTime in Compact Framework Pin
Phil J Pearson8-Apr-04 1:41
Phil J Pearson8-Apr-04 1:41 
GeneralRe: Read a COleDateTime in Compact Framework Pin
Mike Dimmick8-Apr-04 2:25
Mike Dimmick8-Apr-04 2:25 
GeneralRe: Read a COleDateTime in Compact Framework Pin
Phil J Pearson8-Apr-04 2:35
Phil J Pearson8-Apr-04 2:35 
GeneralRe: Read a COleDateTime in Compact Framework Pin
Mike Dimmick8-Apr-04 5:53
Mike Dimmick8-Apr-04 5:53 
GeneralPocket PC 2003 emulator without VS .NET Pin
User 9625787-Apr-04 10:12
User 9625787-Apr-04 10:12 
GeneralRe: Pocket PC 2003 emulator without VS .NET Pin
Roman Rodov7-Apr-04 14:47
Roman Rodov7-Apr-04 14:47 
GeneralRe: Pocket PC 2003 emulator without VS .NET Pin
User 9625787-Apr-04 19:49
User 9625787-Apr-04 19:49 
GeneralRe: Pocket PC 2003 emulator without VS .NET Pin
User 96257810-Apr-04 9:05
User 96257810-Apr-04 9:05 
General.net CF Pin
monn6-Apr-04 17:04
monn6-Apr-04 17:04 

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.