Click here to Skip to main content
15,889,776 members
Home / Discussions / C#
   

C#

 
GeneralRe: Winform validation Pin
arkiboys10-May-11 3:00
arkiboys10-May-11 3:00 
QuestionRe: Winform validation Pin
Pete O'Hanlon10-May-11 3:13
mvePete O'Hanlon10-May-11 3:13 
AnswerRe: Winform validation Pin
arkiboys10-May-11 5:38
arkiboys10-May-11 5:38 
AnswerRe: Winform validation Pin
Shameel10-May-11 2:56
professionalShameel10-May-11 2:56 
GeneralRe: Winform validation Pin
arkiboys10-May-11 3:00
arkiboys10-May-11 3:00 
GeneralRe: Winform validation Pin
Dave Kreskowiak10-May-11 3:45
mveDave Kreskowiak10-May-11 3:45 
GeneralRe: Winform validation Pin
arkiboys10-May-11 5:37
arkiboys10-May-11 5:37 
QuestionHow to cast unknown object? [modified] Pin
Tesic Goran9-May-11 23:59
professionalTesic Goran9-May-11 23:59 
Hi,

I have this code:

object o = Csla.Serialization.Mobile.MobileFormatter.Deserialize(bin);
object val = ((Csla.Silverlight.PrimitiveCriteria)o).Value;


As you can see I get some object by deserialization. In this particular case I expect the object that is actually of Csla.Silverlight.PrimitiveCriteria type and I can cast the object in second line as I did above. In this case I know the type of object because I've seen it at debug time. But, what to do if I need to determine the type of object at runtime? What to do in case I want to parametrize the whole process? It means the class I get by deserialization can be different. How can I use that class to cast the object in second line?

Thank you in advance.

Goran Tesic

modified on Tuesday, May 10, 2011 6:19 AM

AnswerRe: How to cast unknown object? Pin
Eddy Vluggen10-May-11 0:30
professionalEddy Vluggen10-May-11 0:30 
GeneralRe: How to cast unknown object? Pin
Tesic Goran10-May-11 1:03
professionalTesic Goran10-May-11 1:03 
AnswerRe: How to cast unknown object? Pin
Eddy Vluggen10-May-11 1:25
professionalEddy Vluggen10-May-11 1:25 
GeneralRe: How to cast unknown object? Pin
Tesic Goran10-May-11 1:33
professionalTesic Goran10-May-11 1:33 
AnswerRe: How to cast unknown object? Pin
Eddy Vluggen10-May-11 1:41
professionalEddy Vluggen10-May-11 1:41 
GeneralRe: How to cast unknown object? Pin
Tesic Goran10-May-11 2:19
professionalTesic Goran10-May-11 2:19 
GeneralRe: How to cast unknown object? Pin
Eddy Vluggen10-May-11 2:36
professionalEddy Vluggen10-May-11 2:36 
AnswerRe: How to cast unknown object? Pin
Sanjay J Patolia10-May-11 5:05
Sanjay J Patolia10-May-11 5:05 
GeneralRe: How to cast unknown object? Pin
Tesic Goran10-May-11 20:27
professionalTesic Goran10-May-11 20:27 
QuestionNeed concept regarding website visit tracking software c# Pin
Tridip Bhattacharjee9-May-11 21:35
professionalTridip Bhattacharjee9-May-11 21:35 
AnswerRe: Need concept regarding website visit tracking software c# Pin
ambarishtv9-May-11 22:56
ambarishtv9-May-11 22:56 
AnswerRe: Need concept regarding website visit tracking software c# Pin
Eddy Vluggen10-May-11 0:36
professionalEddy Vluggen10-May-11 0:36 
AnswerRe: Need concept regarding website visit tracking software c# Pin
Dave Kreskowiak10-May-11 1:17
mveDave Kreskowiak10-May-11 1:17 
QuestionMaskedTextBox for IP address entry sample? Pin
9ine9-May-11 20:56
9ine9-May-11 20:56 
AnswerRe: MaskedTextBox for IP address entry sample? Pin
Blue_Boy9-May-11 21:00
Blue_Boy9-May-11 21:00 
QuestionWhere to keep the public variables & Functions? VS2010 Pin
Paramu19739-May-11 2:37
Paramu19739-May-11 2:37 
AnswerRe: Where to keep the public variables & Functions? VS2010 Pin
PIEBALDconsult9-May-11 2:43
mvePIEBALDconsult9-May-11 2:43 

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.