Click here to Skip to main content
15,914,452 members
Home / Discussions / C#
   

C#

 
QuestionClass Library instance management ? Pin
BillWoodruff7-Nov-16 0:59
professionalBillWoodruff7-Nov-16 0:59 
AnswerRe: Class Library instance management ? Pin
Midi_Mick7-Nov-16 1:57
professionalMidi_Mick7-Nov-16 1:57 
I'm not sure I get how that would work. If you are accessing an instance from outside that instance, how could you tell which instance you were actually accessing?

The only thing I can come up with that comes close, that I actually have used in the past, is a static Dictionary, where the keys are some sort of instance identifier, and the value is the instance itself. The constructor adds itself to that dictionary, and Dispose or some sort of release method removes it again.
Cheers,

Mick
------------------------------------------------
It doesn't matter how often or hard you fall on your arse, eventually you'll roll over and land on your feet.

AnswerRe: Class Library instance management ? Pin
Jochen Arndt7-Nov-16 2:06
professionalJochen Arndt7-Nov-16 2:06 
AnswerRe: Class Library instance management ? Pin
Member 37973038-Nov-16 7:46
Member 37973038-Nov-16 7:46 
QuestionOracleDataAdapter.Fill "System.InvalidOperation.Exception" Error Pin
Choi KyuJung6-Nov-16 20:25
Choi KyuJung6-Nov-16 20:25 
AnswerRe: OracleDataAdapter.Fill "System.InvalidOperation.Exception" Error Pin
Michael_Davies6-Nov-16 20:34
Michael_Davies6-Nov-16 20:34 
AnswerRe: OracleDataAdapter.Fill "System.InvalidOperation.Exception" Error Pin
OriginalGriff6-Nov-16 23:27
mveOriginalGriff6-Nov-16 23:27 
AnswerRe: OracleDataAdapter.Fill "System.InvalidOperation.Exception" Error Pin
Richard Deeming7-Nov-16 2:22
mveRichard Deeming7-Nov-16 2:22 
QuestionParallel Array Assignment Pin
Member 128361456-Nov-16 19:37
Member 128361456-Nov-16 19:37 
AnswerRe: Parallel Array Assignment Pin
Richard MacCutchan6-Nov-16 21:42
mveRichard MacCutchan6-Nov-16 21:42 
AnswerRe: Parallel Array Assignment Pin
OriginalGriff6-Nov-16 23:26
mveOriginalGriff6-Nov-16 23:26 
GeneralRe: Parallel Array Assignment Pin
Richard MacCutchan7-Nov-16 0:20
mveRichard MacCutchan7-Nov-16 0:20 
GeneralRe: Parallel Array Assignment Pin
OriginalGriff7-Nov-16 0:51
mveOriginalGriff7-Nov-16 0:51 
Questionadding the values in columns in datagridview Pin
Member 128343325-Nov-16 7:27
Member 128343325-Nov-16 7:27 
QuestionRe: adding the values in columns in datagridview Pin
Richard MacCutchan5-Nov-16 21:02
mveRichard MacCutchan5-Nov-16 21:02 
QuestionList inside a List using with a repeater Pin
Member 128324604-Nov-16 1:09
Member 128324604-Nov-16 1:09 
QuestionMessage Removed Pin
3-Nov-16 14:56
Tung Le Ba Viet3-Nov-16 14:56 
QuestionHow to make hybrid Huffman and RLE compression Pin
Rıza Berkay Ayçelebi2-Nov-16 22:18
Rıza Berkay Ayçelebi2-Nov-16 22:18 
AnswerRe: How to make hybrid Huffman and RLE compression Pin
Pete O'Hanlon2-Nov-16 22:22
mvePete O'Hanlon2-Nov-16 22:22 
AnswerRe: How to make hybrid Huffman and RLE compression Pin
Richard MacCutchan2-Nov-16 22:45
mveRichard MacCutchan2-Nov-16 22:45 
GeneralRe: How to make hybrid Huffman and RLE compression Pin
harold aptroot4-Nov-16 1:29
harold aptroot4-Nov-16 1:29 
Questionhow to capture a screen shot usng c# and asp.net Pin
syedkhaleel20102-Nov-16 21:48
syedkhaleel20102-Nov-16 21:48 
AnswerRe: how to capture a screen shot usng c# and asp.net Pin
Bernhard Hiller2-Nov-16 21:55
Bernhard Hiller2-Nov-16 21:55 
GeneralRe: how to capture a screen shot usng c# and asp.net Pin
syedkhaleel20102-Nov-16 22:04
syedkhaleel20102-Nov-16 22:04 
GeneralRe: how to capture a screen shot usng c# and asp.net Pin
Eddy Vluggen2-Nov-16 22:27
professionalEddy Vluggen2-Nov-16 22:27 

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.