Click here to Skip to main content
15,920,503 members
Home / Discussions / C#
   

C#

 
AnswerRe: Need to pull a date from a web site. Pin
N a v a n e e t h25-Aug-08 18:15
N a v a n e e t h25-Aug-08 18:15 
AnswerRe: Need to pull a date from a web site. Pin
_tasleem25-Aug-08 21:29
_tasleem25-Aug-08 21:29 
QuestionDisposing a custom class Pin
Vodstok25-Aug-08 11:02
Vodstok25-Aug-08 11:02 
AnswerRe: Disposing a custom class Pin
Colin Angus Mackay25-Aug-08 11:07
Colin Angus Mackay25-Aug-08 11:07 
GeneralRe: Disposing a custom class Pin
Vodstok25-Aug-08 11:36
Vodstok25-Aug-08 11:36 
GeneralRe: Disposing a custom class Pin
Colin Angus Mackay25-Aug-08 11:55
Colin Angus Mackay25-Aug-08 11:55 
GeneralRe: Disposing a custom class Pin
Vodstok25-Aug-08 12:05
Vodstok25-Aug-08 12:05 
GeneralRe: Disposing a custom class Pin
Colin Angus Mackay25-Aug-08 12:35
Colin Angus Mackay25-Aug-08 12:35 
Vodstok wrote:
the class isnt static, but the instance is


Okay - You are using the singleton pattern (which ultimately should produce the same effect as a static class - except you have a lot more work to do)

So, with that in mind, back to what you said earlier:
Vodstok wrote:
ok, well that is a load off. This may be relevant to my problem: the object is being used as a static object. would that cause it to persist even though it has been "instantiated" with another identity? Essentially, the variable name is being reused on another page, but is returning all of the same information, even though it should be night and day different.


Assuming that the Instance method is the only thing that creates an Instance of the Category class (and that the constructor which isn't shown is private*) then it will get created once, and once only. The logic does not permit any other instance to be created.

It doesn't matter where in your application you access this, you will always get the same instance back.


* Which is normal for a singleton


GeneralRe: Disposing a custom class Pin
Vodstok25-Aug-08 12:54
Vodstok25-Aug-08 12:54 
GeneralRe: Disposing a custom class Pin
Colin Angus Mackay25-Aug-08 13:40
Colin Angus Mackay25-Aug-08 13:40 
GeneralRe: Disposing a custom class Pin
Vodstok25-Aug-08 13:29
Vodstok25-Aug-08 13:29 
GeneralRe: Disposing a custom class Pin
Colin Angus Mackay25-Aug-08 13:41
Colin Angus Mackay25-Aug-08 13:41 
GeneralRe: Disposing a custom class Pin
Vodstok25-Aug-08 13:48
Vodstok25-Aug-08 13:48 
GeneralRe: Disposing a custom class Pin
Colin Angus Mackay25-Aug-08 13:56
Colin Angus Mackay25-Aug-08 13:56 
GeneralRe: Disposing a custom class Pin
Vodstok25-Aug-08 14:13
Vodstok25-Aug-08 14:13 
QuestionCan an object cast itself to a derived class? Pin
Togakangaroo25-Aug-08 10:32
Togakangaroo25-Aug-08 10:32 
AnswerRe: Can an object cast itself to a derived class? Pin
Colin Angus Mackay25-Aug-08 10:48
Colin Angus Mackay25-Aug-08 10:48 
GeneralRe: Can an object cast itself to a derived class? Pin
Togakangaroo25-Aug-08 11:00
Togakangaroo25-Aug-08 11:00 
AnswerRe: Can an object cast itself to a derived class? Pin
chaiguy133725-Aug-08 14:50
chaiguy133725-Aug-08 14:50 
QuestionHow can I add a button here ? Pin
Mohammad Dayyan25-Aug-08 10:01
Mohammad Dayyan25-Aug-08 10:01 
AnswerRe: How can I add a button here ? Pin
DaveyM6925-Aug-08 10:19
professionalDaveyM6925-Aug-08 10:19 
AnswerRe: How can I add a button here ? Pin
Thomas Stockwell26-Aug-08 2:16
professionalThomas Stockwell26-Aug-08 2:16 
QuestionPassing array to operator overload Pin
DaveyM6925-Aug-08 9:48
professionalDaveyM6925-Aug-08 9:48 
AnswerRe: Passing array to operator overload Pin
DaveyM6925-Aug-08 10:21
professionalDaveyM6925-Aug-08 10:21 
GeneralRe: Passing array to operator overload Pin
chaiguy133725-Aug-08 14:53
chaiguy133725-Aug-08 14:53 

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.