Click here to Skip to main content
16,007,610 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Enumerating all users Pin
Net_DNA22-Jul-06 22:47
Net_DNA22-Jul-06 22:47 
GeneralRe: Enumerating all users Pin
FalkoD23-Jul-06 0:00
FalkoD23-Jul-06 0:00 
QuestionHow about a constructor that autodestructs? Pin
Giancarlo Trevisan22-Jul-06 18:42
Giancarlo Trevisan22-Jul-06 18:42 
AnswerRe: How about a constructor that autodestructs? Pin
Colin Angus Mackay23-Jul-06 0:17
Colin Angus Mackay23-Jul-06 0:17 
GeneralRe: How about a constructor that autodestructs? Pin
Giancarlo Trevisan23-Jul-06 19:08
Giancarlo Trevisan23-Jul-06 19:08 
GeneralRe: How about a constructor that autodestructs? Pin
Colin Angus Mackay23-Jul-06 19:42
Colin Angus Mackay23-Jul-06 19:42 
GeneralRe: How about a constructor that autodestructs? Pin
Giancarlo Trevisan23-Jul-06 20:07
Giancarlo Trevisan23-Jul-06 20:07 
GeneralRe: How about a constructor that autodestructs? Pin
Colin Angus Mackay23-Jul-06 20:15
Colin Angus Mackay23-Jul-06 20:15 
Giancarlo Trevisan wrote:
keep in mind that a NULL is also an instance


Ummm... No. A null is the absence of a instance.

Giancarlo Trevisan wrote:
My consideration is, why not allow constructors that allow ONLY, if necessary, "return null", the semantics would not be crippled yet acquire "selfawareness".


Returning null from a constructor would cripple the semantics of a constructor. The purpose, and I feel I'm repeating myself here, of a constructor is to construct an object. To do anything otherwise would be to "cripple" the semantics of a constructor.

If you don't want it to actually construct an object there is an existing solution and that is to throw an exception. And in fact that isn't really a solution because the instance will already exist at the point the exception is thrown. It just means that, so long as the exception is thrown out of the constructor, nothing will ever reference the instance.


GeneralRe: How about a constructor that autodestructs? Pin
Giancarlo Trevisan23-Jul-06 20:22
Giancarlo Trevisan23-Jul-06 20:22 
GeneralRe: How about a constructor that autodestructs? Pin
Guffa23-Jul-06 22:44
Guffa23-Jul-06 22:44 
GeneralRe: How about a constructor that autodestructs? Pin
Giancarlo Trevisan24-Jul-06 2:05
Giancarlo Trevisan24-Jul-06 2:05 
GeneralRe: How about a constructor that autodestructs? [modified] Pin
Dave Kreskowiak24-Jul-06 2:38
mveDave Kreskowiak24-Jul-06 2:38 
GeneralRe: How about a constructor that autodestructs? [modified] Pin
Giancarlo Trevisan24-Jul-06 2:57
Giancarlo Trevisan24-Jul-06 2:57 
GeneralRe: How about a constructor that autodestructs? Pin
Dave Kreskowiak24-Jul-06 6:44
mveDave Kreskowiak24-Jul-06 6:44 
GeneralRe: How about a constructor that autodestructs? [modified] Pin
Giancarlo Trevisan24-Jul-06 19:06
Giancarlo Trevisan24-Jul-06 19:06 
GeneralRe: How about a constructor that autodestructs? Pin
Colin Angus Mackay24-Jul-06 2:38
Colin Angus Mackay24-Jul-06 2:38 
GeneralRe: How about a constructor that autodestructs? Pin
Giancarlo Trevisan24-Jul-06 3:02
Giancarlo Trevisan24-Jul-06 3:02 
QuestionMS Word - like interface in .NET Pin
ravinamballa22-Jul-06 13:39
ravinamballa22-Jul-06 13:39 
AnswerRe: MS Word - like interface in .NET Pin
Ed.Poore22-Jul-06 21:12
Ed.Poore22-Jul-06 21:12 
GeneralRe: MS Word - like interface in .NET Pin
ravinamballa23-Jul-06 1:23
ravinamballa23-Jul-06 1:23 
Questionwindows service and unmanaged dll Pin
simon_pl22-Jul-06 12:43
simon_pl22-Jul-06 12:43 
AnswerRe: windows service and unmanaged dll Pin
Net_DNA22-Jul-06 22:43
Net_DNA22-Jul-06 22:43 
GeneralRe: windows service and unmanaged dll Pin
simon_pl23-Jul-06 2:37
simon_pl23-Jul-06 2:37 
QuestionAuto generating .sln .csproj files Pin
danielk_22-Jul-06 2:28
danielk_22-Jul-06 2:28 
AnswerRe: Auto generating .sln .csproj files Pin
Ed.Poore22-Jul-06 9:44
Ed.Poore22-Jul-06 9: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.