Re: [ADVANCED-DOTNET] Threading is blocking itself or ?

2002-06-09 Thread Ben Kloosterman
I would never use Priority.Highest except for small threads ( and I woould set the priority back afterwards) it may set things at a higher priority then .NET or the OS! If you use priorities and Threading be-carefull it is the easiest way to deadlock yourself. I program in C# and dont underst

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-09 Thread Ben Kloosterman
This article says a public static is best but I agree with other list members that this is a bad idea UNLESS you are doing a simple implementation when it is a good idea. If you are doing complex multi threaded stuff you would use a Property to make it public . I have a question though is it bet

Re: [ADVANCED-DOTNET] Value type references (versus object refere nces)

2002-06-09 Thread Joe Duffy
Makes perfect sense. Thanks for the explanation -- I'm not sure why I couldn't "wrap my brain around it" myself but perhaps I can blame it on my background in Java. I just need to get accustomed to thinking of quasi-objects (value types) that live on the stack - exactly as Java primitives do - but

Re: [ADVANCED-DOTNET] Threading is blocking itself or ?

2002-06-09 Thread Jesse Sanders
Update: Originally, I was trying to make SOAP calls across a VPN from home to work, but I kept getting weird results. I created two methods, one to create new threads and another one which run syncronously. I ran the app from work and both methods submitted all of the requests correctly. When

Re: [ADVANCED-DOTNET] Value type references (versus object refere nces)

2002-06-09 Thread Craig Andera
> I appreciate the advantages that value types bring to the > table, but I am still missing the reason why references to > value types cannot hold NULL. Yeah, it's a bit confusing until you wrap your brain around it. Let's consider just the case of local variables for a moment, since it makes thi

Re: [ADVANCED-DOTNET] Value type references (versus object refere nces)

2002-06-09 Thread Joe Duffy
I guess that most of my frustration arises from the fact that workarounds such as the wrapping suggestion are necessary - and are not provided by the .NET API at all. Due to boxing and other similar features, I understand the making most primitive types map to a class rather than a struct would ca

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-09 Thread Peter Meinl
This article discusses the singelton pattern and its Gof and .NET implementation: Exploring the Singleton Design Pattern http://msdn.microsoft.com/library/default.asp?url=/library/en- us/dnbda/html/singletondespatt.asp -- Peter Meinl ISTEC GmbH You can read messages from the Advanced DOTNET arch

[ADVANCED-DOTNET] Threading is blocking itself or ?

2002-06-09 Thread Jesse Sanders
Hi all, I searched the archives on threading, but I didn't see anything close to my problem. What I am trying to do is send 100 SOAP requests to a server at once to stress test it. I wrote it originally in VB6, but the requests were getting backjammed, so I turned to VB.Net to solve this issue

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-09 Thread Axel Heitland
If you like properties better, then why not use a private static field and return that value with a property getter? My regards Axel -Original Message- From: Stefan Holdermans [mailto:[EMAIL PROTECTED]] Sent: Samstag, 8. Juni 2002 17:50 To: [EMAIL PROTECTED] Subject: Re: [ADVANCE

Re: [ADVANCED-DOTNET] custom web control and the gac

2002-06-09 Thread Craig McMurtry
You are confronted with a limitation of custom Web controls. Khoi Pham <[EMAIL PROTECTED]> Sent by: "Moderated discussion of advanced .NET topics." <[EMAIL PROTECTED]> 06/08/2002 11:51 AM Please respond to "Moderated discussion of advanced .NET topics." To: [EMAIL PROTECTED]

Re: [ADVANCED-DOTNET] Value type references (versus object references)

2002-06-09 Thread Nick Wienholt
Why not wrap the value types in a reference type (to support nulls), and provide an implicit conversion operator to the value type. There will be some small perf hits due to heap allocation and indirect access, but compared to cross-network DB access, they are unlikely to be significant. Example

Re: [ADVANCED-DOTNET] custom web control and the gac

2002-06-09 Thread Craig Andera
In your @Register directive, you need to tell it the fully qualified name of the assembly. This should be something like "comp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5f8d6dd25012". You can get it easily by copying the appropriate results of running gacutil -l from the command line.

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-09 Thread Frank Hileman
I don't approve of public fields either. My point was, the best way to implement the singleton pattern is to use a static field, optionally with a static constructor. This is automatically thread-safe, and the object will not be constructed until the class is used. No need for locking, etc. Here i

Re: [ADVANCED-DOTNET] Singleton pattern

2002-06-09 Thread Thomas Tomiczek
The poster did not say that the static var has to be - public. I use static vars (as singleton) in combination with a static accessor Method (GetInstance()). No public method. Regards Thomas Tomiczek THONA Consulting Ltd. (Microsoft MVP C#/.NET) -Original Message- From: Stefan Holderm