Click here to Skip to main content
15,880,651 members
Home / Discussions / C#
   

C#

 
GeneralRe: Close the form programmaticaly. Pin
tingu27-Feb-08 12:02
tingu27-Feb-08 12:02 
GeneralRe: Close the form programmaticaly. Pin
Anthony Mushrow27-Feb-08 13:55
professionalAnthony Mushrow27-Feb-08 13:55 
GeneralRe: Close the form programmaticaly. Pin
jasper01827-Feb-08 15:42
jasper01827-Feb-08 15:42 
General'TANK_2.Images.Images()': access modifiers are not allowed on static constructors Pin
Jordanwb27-Feb-08 9:00
Jordanwb27-Feb-08 9:00 
GeneralRe: 'TANK_2.Images.Images()': access modifiers are not allowed on static constructors Pin
Christian Graus27-Feb-08 9:01
protectorChristian Graus27-Feb-08 9:01 
GeneralRe: 'TANK_2.Images.Images()': access modifiers are not allowed on static constructors Pin
Jordanwb27-Feb-08 9:04
Jordanwb27-Feb-08 9:04 
GeneralRe: 'TANK_2.Images.Images()': access modifiers are not allowed on static constructors Pin
Christian Graus27-Feb-08 9:33
protectorChristian Graus27-Feb-08 9:33 
GeneralWebServices and singleton pattern Pin
yarns27-Feb-08 8:34
yarns27-Feb-08 8:34 
Hi,

i have sample code like this:
public class Service1 : System.Web.Services.WebService<br />
{<br />
    [WebMethod]<br />
    public string HelloWorld()<br />
    {<br />
        string ble = testowySingleton.Polaczenie;<br />
        return ble;<br />
    }<br />
}<br />
public static class testowySingleton<br />
{<br />
    public static string Polaczenie<br />
    {<br />
        get<br />
        {<br />
            lock (connectionlock)<br />
            {<br />
                if (_polaczenie == null)<br />
                {<br />
                    _polaczenie = "";<br />
                    <br />
                }<br />
                else<br />
                {<br />
                    _polaczenie += "a";<br />
                }<br />
                return _polaczenie;<br />
            }<br />
        }<br />
    }<br />
    private static string _polaczenie = null;<br />
    private static readonly object connectionlock = new object();<br />
}


How i can get one instance per client not one for all clients?
Any idea? And im wonder when this object will be destroyed...

Greetings
GeneralRe: WebServices and singleton pattern Pin
led mike27-Feb-08 8:49
led mike27-Feb-08 8:49 
GeneralRe: WebServices and singleton pattern Pin
yarns27-Feb-08 8:51
yarns27-Feb-08 8:51 
GeneralRender loop for other process Pin
Jitse27-Feb-08 8:24
Jitse27-Feb-08 8:24 
GeneralRe: Render loop for other process Pin
Dave Kreskowiak27-Feb-08 10:07
mveDave Kreskowiak27-Feb-08 10:07 
GeneralRe: Render loop for other process Pin
Jitse28-Feb-08 3:47
Jitse28-Feb-08 3:47 
GeneralRe: Render loop for other process Pin
Dave Kreskowiak28-Feb-08 14:44
mveDave Kreskowiak28-Feb-08 14:44 
GeneralRe: Render loop for other process Pin
Jitse29-Feb-08 9:33
Jitse29-Feb-08 9:33 
GeneralRe: Render loop for other process Pin
Dave Kreskowiak29-Feb-08 18:28
mveDave Kreskowiak29-Feb-08 18:28 
GeneralRe: Render loop for other process Pin
Jitse1-Mar-08 2:10
Jitse1-Mar-08 2:10 
GeneralRe: Render loop for other process Pin
Dave Kreskowiak1-Mar-08 14:45
mveDave Kreskowiak1-Mar-08 14:45 
GeneralRe: Render loop for other process Pin
Jitse2-Mar-08 2:23
Jitse2-Mar-08 2:23 
QuestionUsing System.Reflection to walk values in an array??? Pin
LongRange.Shooter27-Feb-08 8:08
LongRange.Shooter27-Feb-08 8:08 
GeneralRe: Using System.Reflection to walk values in an array??? Pin
buchstaben27-Feb-08 8:18
buchstaben27-Feb-08 8:18 
GeneralRe: Using System.Reflection to walk values in an array??? Pin
LongRange.Shooter27-Feb-08 8:32
LongRange.Shooter27-Feb-08 8:32 
GeneralRe: Using System.Reflection to walk values in an array??? Pin
buchstaben27-Feb-08 8:42
buchstaben27-Feb-08 8:42 
GeneralRe: Using System.Reflection to walk values in an array??? Pin
LongRange.Shooter27-Feb-08 12:15
LongRange.Shooter27-Feb-08 12:15 
Generalvs 2003 debugger issue Pin
robustm27-Feb-08 7:53
robustm27-Feb-08 7: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.