Click here to Skip to main content
15,886,724 members
Home / Discussions / C#
   

C#

 
GeneralRe: Filter Gridview that are bound to an XML file Pin
Ronni Marker22-Oct-09 6:15
Ronni Marker22-Oct-09 6:15 
Questionconvert .xls file into image file or word image file Pin
Member 438836022-Oct-09 1:24
Member 438836022-Oct-09 1:24 
AnswerRe: convert .xls file into image file or word image file Pin
Ashfield22-Oct-09 1:30
Ashfield22-Oct-09 1:30 
AnswerRe: convert .xls file into image file or word image file Pin
Wes Aday22-Oct-09 4:06
professionalWes Aday22-Oct-09 4:06 
AnswerRe: convert .xls file into image file or word image file Pin
benjymous22-Oct-09 5:03
benjymous22-Oct-09 5:03 
Questionhaving problem in opening Ms Office files into webBrowser Pin
muhammad_umair22-Oct-09 1:08
muhammad_umair22-Oct-09 1:08 
AnswerRe: having problem in opening Ms Office files into webBrowser Pin
Richard MacCutchan22-Oct-09 1:50
mveRichard MacCutchan22-Oct-09 1:50 
QuestionUsing lock statement inside overloaded methods Pin
Nuno Pacheco22-Oct-09 0:19
Nuno Pacheco22-Oct-09 0:19 
Hello to all.

I'm new in this message board, and I couldn't find this subject elsewhere.
The thing is, I need to know if I can use the lock satement inside an overloaded method, i.e.:
public static string MyString = 0;
private static object objMyLock = new object();

public static void DoSomething(int Index, string Field)
  {
  lock (objMyLock)
    {
    MyString = Field + Index.ToString();
    }
  }

public static bool DoSomething(string Name, string Field)
  {
  lock (objMyLock)
    {
    MyString = Field + Name;
    }
  }

Does the lock Statement used like this, ensures that the variable MyString is changed by one thread at a time?

Thank you!

NMFPacheco - Portugal
AnswerRe: Using lock statement inside overloaded methods Pin
Covean22-Oct-09 1:12
Covean22-Oct-09 1:12 
GeneralRe: Using lock statement inside overloaded methods Pin
Nuno Pacheco22-Oct-09 1:23
Nuno Pacheco22-Oct-09 1:23 
GeneralRe: Using lock statement inside overloaded methods Pin
Covean22-Oct-09 1:48
Covean22-Oct-09 1:48 
GeneralRe: Using lock statement inside overloaded methods Pin
Nuno Pacheco22-Oct-09 2:36
Nuno Pacheco22-Oct-09 2:36 
GeneralRe: Using lock statement inside overloaded methods Pin
Covean22-Oct-09 2:53
Covean22-Oct-09 2:53 
Questionhow to create multiple connections in a client application Pin
Ajithevn21-Oct-09 23:36
Ajithevn21-Oct-09 23:36 
QuestionRe: how to create multiple connections in a client application Pin
Björn T.J.M. Spruit22-Oct-09 0:00
Björn T.J.M. Spruit22-Oct-09 0:00 
AnswerRe: how to create multiple connections in a client application Pin
Ajithevn22-Oct-09 0:11
Ajithevn22-Oct-09 0:11 
AnswerRe: how to create multiple connections in a client application Pin
Abhishek Sur22-Oct-09 0:07
professionalAbhishek Sur22-Oct-09 0:07 
GeneralRe: how to create multiple connections in a client application Pin
Ajithevn22-Oct-09 0:17
Ajithevn22-Oct-09 0:17 
QuestionRe: how to create multiple connections in a client application Pin
Ajithevn22-Oct-09 1:04
Ajithevn22-Oct-09 1:04 
QuestionText blurring using Graphics.Drawstring Pin
Björn T.J.M. Spruit21-Oct-09 23:04
Björn T.J.M. Spruit21-Oct-09 23:04 
AnswerRe: Text blurring using Graphics.Drawstring Pin
Björn T.J.M. Spruit22-Oct-09 1:54
Björn T.J.M. Spruit22-Oct-09 1:54 
GeneralRe: Text blurring using Graphics.Drawstring Pin
Covean22-Oct-09 2:15
Covean22-Oct-09 2:15 
GeneralRe: Text blurring using Graphics.Drawstring [modified] Pin
Björn T.J.M. Spruit22-Oct-09 2:54
Björn T.J.M. Spruit22-Oct-09 2:54 
GeneralRe: Text blurring using Graphics.Drawstring Pin
Covean22-Oct-09 3:18
Covean22-Oct-09 3:18 
GeneralRe: Text blurring using Graphics.Drawstring Pin
Björn T.J.M. Spruit22-Oct-09 3:27
Björn T.J.M. Spruit22-Oct-09 3: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.