Click here to Skip to main content
15,881,811 members
Home / Discussions / C#
   

C#

 
GeneralRe: Threads and semaphores Pin
Clifford Nelson2-Nov-12 6:44
Clifford Nelson2-Nov-12 6:44 
Questioncasting at runtime in c# Pin
prasadbuddhika31-Oct-12 6:15
prasadbuddhika31-Oct-12 6:15 
AnswerRe: casting at runtime in c# Pin
Simon_Whale31-Oct-12 6:31
Simon_Whale31-Oct-12 6:31 
GeneralRe: casting at runtime in c# Pin
prasadbuddhika31-Oct-12 6:34
prasadbuddhika31-Oct-12 6:34 
GeneralRe: casting at runtime in c# Pin
Simon_Whale31-Oct-12 6:41
Simon_Whale31-Oct-12 6:41 
GeneralRe: casting at runtime in c# Pin
prasadbuddhika31-Oct-12 6:48
prasadbuddhika31-Oct-12 6:48 
GeneralRe: casting at runtime in c# Pin
Simon_Whale31-Oct-12 6:48
Simon_Whale31-Oct-12 6:48 
GeneralRe: casting at runtime in c# Pin
prasadbuddhika31-Oct-12 17:04
prasadbuddhika31-Oct-12 17:04 
hi ,
this is how i'm doing the deserialization

C#
Type genericSyncObj = typeof(SyncObject<>);
						Type syncObj = genericSyncObj.MakeGenericType(type);
IList customObjectList = (IList)Activator.CreateInstance((typeof(List<>).MakeGenericType(type)));

foreach (string value in pullRequest.Knowledge)
{
dynamic syncObject = JasonSerializer.Deserialize(value, syncObj, null);
customObjectList.Add(syncObject.Object);
}


and i'm getting the exception at here

C#
dynamic responseSync = Activator.CreateInstance(typeof(SyncObject<>).MakeGenericType(type));
responseSync.Object =  customObjectList[y] ;


thanks .
GeneralRe: casting at runtime in c# Pin
Simon_Whale1-Nov-12 0:45
Simon_Whale1-Nov-12 0:45 
GeneralRe: casting at runtime in c# Pin
prasadbuddhika1-Nov-12 4:24
prasadbuddhika1-Nov-12 4:24 
GeneralRe: casting at runtime in c# Pin
Simon_Whale1-Nov-12 5:05
Simon_Whale1-Nov-12 5:05 
GeneralRe: casting at runtime in c# Pin
prasadbuddhika1-Nov-12 5:25
prasadbuddhika1-Nov-12 5:25 
GeneralRe: casting at runtime in c# Pin
BobJanova1-Nov-12 5:19
BobJanova1-Nov-12 5:19 
GeneralRe: casting at runtime in c# Pin
prasadbuddhika1-Nov-12 5:28
prasadbuddhika1-Nov-12 5:28 
QuestionC# Experts Pin
Member 955692930-Oct-12 19:32
Member 955692930-Oct-12 19:32 
AnswerRe: C# Experts Pin
Pete O'Hanlon30-Oct-12 21:29
mvePete O'Hanlon30-Oct-12 21:29 
QuestionSocket read deserialization exception (fyi - problem already resolved) Pin
devvvy30-Oct-12 17:19
devvvy30-Oct-12 17:19 
QuestionMaking Serial Port Visible Pin
C-P-User-330-Oct-12 11:35
C-P-User-330-Oct-12 11:35 
AnswerRe: Making Serial Port Visible Pin
Pete O'Hanlon30-Oct-12 11:59
mvePete O'Hanlon30-Oct-12 11:59 
AnswerRe: Making Serial Port Visible Pin
Big Daddy Farang30-Oct-12 12:05
Big Daddy Farang30-Oct-12 12:05 
GeneralRe: Making Serial Port Visible Pin
C-P-User-330-Oct-12 12:33
C-P-User-330-Oct-12 12:33 
GeneralRe: Making Serial Port Visible Pin
C-P-User-330-Oct-12 13:09
C-P-User-330-Oct-12 13:09 
GeneralRe: Making Serial Port Visible Pin
Big Daddy Farang30-Oct-12 13:42
Big Daddy Farang30-Oct-12 13:42 
GeneralRe: Making Serial Port Visible Pin
C-P-User-331-Oct-12 4:43
C-P-User-331-Oct-12 4:43 
GeneralRe: Making Serial Port Visible Pin
Pete O'Hanlon31-Oct-12 5:02
mvePete O'Hanlon31-Oct-12 5:02 

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.