Click here to Skip to main content
15,899,679 members
Home / Discussions / C#
   

C#

 
Questionhow to implement WHITEBOARD for many users Pin
xinxin_52515-Apr-05 23:33
xinxin_52515-Apr-05 23:33 
AnswerRe: how to implement WHITEBOARD for many users Pin
Colin Angus Mackay15-Apr-05 23:48
Colin Angus Mackay15-Apr-05 23:48 
GeneralURI format not supported Pin
Adnan Siddiqi15-Apr-05 22:29
Adnan Siddiqi15-Apr-05 22:29 
GeneralRe: URI format not supported Pin
Heath Stewart16-Apr-05 8:18
protectorHeath Stewart16-Apr-05 8:18 
GeneralRe: URI format not supported Pin
Adnan Siddiqi17-Apr-05 6:00
Adnan Siddiqi17-Apr-05 6:00 
GeneralRe: URI format not supported Pin
Heath Stewart17-Apr-05 16:24
protectorHeath Stewart17-Apr-05 16:24 
GeneralFun with collections... Pin
tantiboh15-Apr-05 22:13
tantiboh15-Apr-05 22:13 
GeneralRe: Fun with collections... Pin
Colin Angus Mackay15-Apr-05 23:37
Colin Angus Mackay15-Apr-05 23:37 
tantiboh wrote:
ClassA myClassA = (ClassA)myHashTable[searchkey];
//I need to be able to complete both of the following operations:
string str = myClassA.name; //Causes an exception
myClassA.name = "newname"; //Causes an exception


The reason these two lines fail is that the first line I've quoted does not return a value, so myClassA is null. This is because either (1) the searchkey does not correspond to any key in the HashTable, or (2) the value null is stored for that searchkey.

The most likely explanation is that when you insert something into the HashTable you are using a string, when you try to retrieve something from the HashTable you are using an int. You must be consistent. Choose either a string or an int and stick to it.


My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More


GeneralRe: Fun with collections... Pin
tantiboh16-Apr-05 6:29
tantiboh16-Apr-05 6:29 
GeneralVS.NET 2003 IDE Pin
pmasknguyen15-Apr-05 18:43
pmasknguyen15-Apr-05 18:43 
GeneralRe: VS.NET 2003 IDE Pin
leppie15-Apr-05 21:05
leppie15-Apr-05 21:05 
GeneralWeb Page Generator using C... Pin
ZMAN072815-Apr-05 14:16
ZMAN072815-Apr-05 14:16 
GeneralRe: Web Page Generator using C... Pin
Yulianto.15-Apr-05 16:07
Yulianto.15-Apr-05 16:07 
Questionget size of picture folder?? Pin
Anonymous15-Apr-05 12:58
Anonymous15-Apr-05 12:58 
AnswerRe: get size of picture folder?? Pin
Nicholas Cardi15-Apr-05 13:21
Nicholas Cardi15-Apr-05 13:21 
GeneralAppDomain Question Pin
cobyjone15-Apr-05 12:53
cobyjone15-Apr-05 12:53 
GeneralRe: AppDomain Question Pin
turbochimp15-Apr-05 17:55
turbochimp15-Apr-05 17:55 
GeneralRe: AppDomain Question Pin
cobyjone15-Apr-05 18:19
cobyjone15-Apr-05 18:19 
GeneralRe: AppDomain Question Pin
turbochimp15-Apr-05 19:11
turbochimp15-Apr-05 19:11 
GeneralRe: AppDomain Question Pin
leppie15-Apr-05 21:19
leppie15-Apr-05 21:19 
GeneralReflection problem Pin
Anonymous15-Apr-05 12:23
Anonymous15-Apr-05 12:23 
GeneralRe: Reflection problem Pin
leppie15-Apr-05 21:22
leppie15-Apr-05 21:22 
Generalremoving characters Pin
cishi_us15-Apr-05 11:40
cishi_us15-Apr-05 11:40 
GeneralRe: removing characters Pin
Nicholas Cardi15-Apr-05 11:45
Nicholas Cardi15-Apr-05 11:45 
GeneralRe: removing characters Pin
tantiboh15-Apr-05 22:17
tantiboh15-Apr-05 22:17 

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.