Click here to Skip to main content
15,888,202 members
Home / Discussions / C#
   

C#

 
QuestionWPF DATAGRID IMAGE COLUMN IMAGE CHANGING Pin
ALI HASSAN RIZVI9-Jul-12 21:25
ALI HASSAN RIZVI9-Jul-12 21:25 
AnswerRe: WPF DATAGRID IMAGE COLUMN IMAGE CHANGING Pin
OriginalGriff9-Jul-12 21:38
mveOriginalGriff9-Jul-12 21:38 
AnswerRe: WPF DATAGRID IMAGE COLUMN IMAGE CHANGING Pin
Pete O'Hanlon9-Jul-12 22:11
mvePete O'Hanlon9-Jul-12 22:11 
QuestionLink between dataset and datagrid Pin
khaledTawa9-Jul-12 20:07
khaledTawa9-Jul-12 20:07 
AnswerRe: Link between dataset and datagrid Pin
OriginalGriff9-Jul-12 21:04
mveOriginalGriff9-Jul-12 21:04 
AnswerRe: Link between dataset and datagrid Pin
Pete O'Hanlon9-Jul-12 22:12
mvePete O'Hanlon9-Jul-12 22:12 
QuestionAccessing HashTable at ButtonClick Level Pin
mrfalk9-Jul-12 13:28
mrfalk9-Jul-12 13:28 
SuggestionRe: Accessing HashTable at ButtonClick Level Pin
Trak4Net9-Jul-12 17:19
Trak4Net9-Jul-12 17:19 
If you have code that initializes the hashtable from an external source (file, db etc.) I would create a class that handles all the initialization in the constructor then you can create public methods to access the hashtable or make the hashtable a public readonly property. This will separate your hashtable logic from other objects in your program and make it cleaner all around.

Depending on where you need to access the hashtable you can initialize a new instance of your class at a program level, or just within a single form.

C#
static class program
{
  internal MyCustomHashtable mch = new MyCustomHashtable();
}

or...

public Form1 : form
{
  internal MyCustomHashtable mch = new MyCustomHashtable();


//an example of accessing within button click
//would work with either program or form initialization
  button1_click(...)
{
//just an idea of usage...
 string val = mch.GetValue(textBox1.text);
 //...do something with val...
}
}


Not sure what exactly your after, hopefully this helps you out.
GeneralRe: Accessing HashTable at ButtonClick Level Pin
mrfalk10-Jul-12 6:02
mrfalk10-Jul-12 6:02 
GeneralRe: Accessing HashTable at ButtonClick Level Pin
Trak4Net10-Jul-12 6:54
Trak4Net10-Jul-12 6:54 
AnswerRe: Accessing HashTable at ButtonClick Level Pin
Pete O'Hanlon10-Jul-12 7:09
mvePete O'Hanlon10-Jul-12 7:09 
GeneralRe: Accessing HashTable at ButtonClick Level Pin
mrfalk10-Jul-12 11:14
mrfalk10-Jul-12 11:14 
SuggestionRe: Accessing HashTable at ButtonClick Level Pin
Matt T Heffron10-Jul-12 14:22
professionalMatt T Heffron10-Jul-12 14:22 
GeneralRe: Accessing HashTable at ButtonClick Level Pin
mrfalk11-Jul-12 10:46
mrfalk11-Jul-12 10:46 
QuestionQuestion... loading unmanaged dll in x64 system Pin
Blubbo9-Jul-12 9:25
Blubbo9-Jul-12 9:25 
AnswerRe: Question... loading unmanaged dll in x64 system Pin
Ian Shlasko9-Jul-12 9:51
Ian Shlasko9-Jul-12 9:51 
GeneralRe: Question... loading unmanaged dll in x64 system Pin
Luc Pattyn9-Jul-12 10:38
sitebuilderLuc Pattyn9-Jul-12 10:38 
Generalodd Custom control size issue Pin
Blubbo9-Jul-12 6:37
Blubbo9-Jul-12 6:37 
GeneralRe: odd Custom control size issue Pin
Pete O'Hanlon9-Jul-12 7:20
mvePete O'Hanlon9-Jul-12 7:20 
GeneralRe: odd Custom control size issue Pin
Blubbo9-Jul-12 8:09
Blubbo9-Jul-12 8:09 
GeneralRe: odd Custom control size issue Pin
Pete O'Hanlon9-Jul-12 8:51
mvePete O'Hanlon9-Jul-12 8:51 
AnswerRe: odd Custom control size issue Pin
Luc Pattyn9-Jul-12 8:58
sitebuilderLuc Pattyn9-Jul-12 8:58 
QuestionAnimation on ContentPresenter ContenSource Changed Pin
ezazazel9-Jul-12 4:16
ezazazel9-Jul-12 4:16 
QuestionHow to return a DataSet reuslt from LINQ class Pin
Ahmed_Worke9-Jul-12 3:57
Ahmed_Worke9-Jul-12 3:57 
QuestionExcel line-column combination chart using C#. Pin
Member 91698878-Jul-12 21:10
Member 91698878-Jul-12 21:10 

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.