Click here to Skip to main content
15,915,019 members
Home / Discussions / C#
   

C#

 
GeneralRe: appending "\" to a string Pin
Ashfield30-Sep-08 4:53
Ashfield30-Sep-08 4:53 
GeneralRe: appending "\" to a string Pin
omlac30-Sep-08 20:34
omlac30-Sep-08 20:34 
AnswerRe: appending "\" to a string Pin
Mogaambo30-Sep-08 4:33
Mogaambo30-Sep-08 4:33 
AnswerRe: appending "\" to a string Pin
Daniel Grunwald30-Sep-08 5:37
Daniel Grunwald30-Sep-08 5:37 
AnswerRe: appending "\" to a string Pin
omlac30-Sep-08 20:35
omlac30-Sep-08 20:35 
AnswerRe: appending "\" to a string Pin
omlac30-Sep-08 21:51
omlac30-Sep-08 21:51 
Questionprogressbar problem Pin
Mogaambo30-Sep-08 3:21
Mogaambo30-Sep-08 3:21 
QuestionInvalidCastException: asp.net custom class Application variable [modified] Pin
davidhere4030-Sep-08 2:56
davidhere4030-Sep-08 2:56 
Background: I built a really cool chat that just uses ajax and asp.net pages. Its even event based. I had to build it because nothing else out there does what I want.

Problem: I have to store the chat messages and some other things as global variables in the application variable. Like List<chatmessage> msgList.
But I get invalid cast exceptions when I try to initialize a local variable of the same type. Its because its not thread safe. So, from different threads List<ChatMessage> isn't the same type.

my only other solution is to create a separate list for each property of ChatMessage. like List<string> msgList_msg; List<string> msgList_is_blocked, List<string> msgList_date, List<string> msgList_userId.
I don't want to do that but I don't feel like I have a choice.

Any Ideas or Suggestions?

modified on Tuesday, September 30, 2008 9:09 AM

JokeRe: InvalidCastException: asp.net custom class Application variable Pin
Giorgi Dalakishvili30-Sep-08 3:19
mentorGiorgi Dalakishvili30-Sep-08 3:19 
GeneralRe: InvalidCastException: asp.net custom class Application variable Pin
Wendelius30-Sep-08 3:47
mentorWendelius30-Sep-08 3:47 
GeneralRe: InvalidCastException: asp.net custom class Application variable Pin
Giorgi Dalakishvili30-Sep-08 3:53
mentorGiorgi Dalakishvili30-Sep-08 3:53 
GeneralRe: InvalidCastException: asp.net custom class Application variable Pin
Mbah Dhaim30-Sep-08 10:33
Mbah Dhaim30-Sep-08 10:33 
Questionrestore Pin
NiloofarNoroozi30-Sep-08 2:53
NiloofarNoroozi30-Sep-08 2:53 
AnswerRe: restore Pin
Wendelius30-Sep-08 3:46
mentorWendelius30-Sep-08 3:46 
QuestionIf I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
arnold_w30-Sep-08 2:21
arnold_w30-Sep-08 2:21 
AnswerRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
Pete O'Hanlon30-Sep-08 2:31
mvePete O'Hanlon30-Sep-08 2:31 
AnswerRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
Giorgi Dalakishvili30-Sep-08 2:36
mentorGiorgi Dalakishvili30-Sep-08 2:36 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
arnold_w30-Sep-08 21:57
arnold_w30-Sep-08 21:57 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
Giorgi Dalakishvili30-Sep-08 22:02
mentorGiorgi Dalakishvili30-Sep-08 22:02 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
arnold_w30-Sep-08 22:06
arnold_w30-Sep-08 22:06 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
Giorgi Dalakishvili30-Sep-08 22:10
mentorGiorgi Dalakishvili30-Sep-08 22:10 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
arnold_w30-Sep-08 22:27
arnold_w30-Sep-08 22:27 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
Giorgi Dalakishvili30-Sep-08 22:33
mentorGiorgi Dalakishvili30-Sep-08 22:33 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
arnold_w30-Sep-08 22:42
arnold_w30-Sep-08 22:42 
GeneralRe: If I link in files (DLLs, GIF-images, etc) into my executable, how do I then access the files? Pin
Giorgi Dalakishvili30-Sep-08 22:44
mentorGiorgi Dalakishvili30-Sep-08 22:44 

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.