Click here to Skip to main content
15,881,588 members
Home / Discussions / C#
   

C#

 
GeneralRe: Custom Event Handler Problem. Pin
Gareth H9-Feb-08 7:22
Gareth H9-Feb-08 7:22 
GeneralRe: Custom Event Handler Problem. Pin
amargujrathi20069-Feb-08 8:06
amargujrathi20069-Feb-08 8:06 
GeneralRe: Custom Event Handler Problem. Pin
hdv2129-Feb-08 8:10
hdv2129-Feb-08 8:10 
GeneralGPS Data String Pin
Simerjots9-Feb-08 5:29
Simerjots9-Feb-08 5:29 
GeneralRe: GPS Data String Pin
pmarfleet9-Feb-08 7:20
pmarfleet9-Feb-08 7:20 
GeneralRe: GPS Data String Pin
Ed.Poore9-Feb-08 10:25
Ed.Poore9-Feb-08 10:25 
GeneralRe: GPS Data String Pin
Mark Churchill9-Feb-08 14:34
Mark Churchill9-Feb-08 14:34 
QuestionStatic function explained Pin
steve_rm9-Feb-08 2:38
steve_rm9-Feb-08 2:38 
Hello,

I am just writing simple threading program in C# program, I am coming from VB.Net and just wondering why my WriteY() function has to be a static. I through this could be public or private.

Can anyone explain why it has to be a static.

Many thanks,

Steve

<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.Threading;<br />
<br />
namespace App1<br />
{<br />
    class Program<br />
    {<br />
        static void Main(string[] args)<br />
        {<br />
            Thread t = new Thread(WriteY);<br />
            t.Start();<br />
            while (true) Console.Write("X");<br />
        }<br />
<br />
        static void WriteY()<br />
        {<br />
            while (true)<br />
                Console.Write("Y");<br />
        }<br />
    }<br />
}<br />

GeneralRe: Static function explained Pin
Not Active9-Feb-08 2:42
mentorNot Active9-Feb-08 2:42 
GeneralRe: Static function explained Pin
DeveshKumar9-Feb-08 5:10
DeveshKumar9-Feb-08 5:10 
GeneralRe: Static function explained Pin
Pete O'Hanlon9-Feb-08 9:29
mvePete O'Hanlon9-Feb-08 9:29 
GeneralLinq query vs foreach loop [modified] Pin
DaveyM699-Feb-08 1:13
professionalDaveyM699-Feb-08 1:13 
GeneralRe: Linq query vs foreach loop Pin
That's Aragon9-Feb-08 1:30
That's Aragon9-Feb-08 1:30 
GeneralRe: Linq query vs foreach loop Pin
Daniel Grunwald9-Feb-08 2:27
Daniel Grunwald9-Feb-08 2:27 
GeneralRe: Linq query vs foreach loop Pin
DaveyM699-Feb-08 3:04
professionalDaveyM699-Feb-08 3:04 
GeneralRe: Linq query vs foreach loop Pin
Gareth H9-Feb-08 1:31
Gareth H9-Feb-08 1:31 
GeneralRe: Linq query vs foreach loop Pin
Daniel Grunwald9-Feb-08 2:36
Daniel Grunwald9-Feb-08 2:36 
GeneralRe: Linq query vs foreach loop Pin
DaveyM699-Feb-08 3:03
professionalDaveyM699-Feb-08 3:03 
GeneralRe: Linq query vs foreach loop Pin
WillemM9-Feb-08 7:54
WillemM9-Feb-08 7:54 
GeneralRe: Linq query vs foreach loop Pin
DaveyM699-Feb-08 8:29
professionalDaveyM699-Feb-08 8:29 
GeneralRe: Linq query vs foreach loop Pin
Guffa9-Feb-08 8:30
Guffa9-Feb-08 8:30 
GeneralRe: Linq query vs foreach loop Pin
DaveyM699-Feb-08 8:44
professionalDaveyM699-Feb-08 8:44 
GeneralRe: Linq query vs foreach loop Pin
Guffa9-Feb-08 11:40
Guffa9-Feb-08 11:40 
GeneralRe: Linq query vs foreach loop Pin
Guffa13-Feb-08 8:19
Guffa13-Feb-08 8:19 
QuestionDocument scanning in C# Pin
Member 26713148-Feb-08 23:27
Member 26713148-Feb-08 23: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.