Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
QuestionC# asp.net VS 2008 3.5 Friendly name tag issue Pin
Wheels01223-Mar-10 5:41
Wheels01223-Mar-10 5:41 
Questionwindows service in C# Pin
m.bilal.farooq23-Mar-10 4:14
m.bilal.farooq23-Mar-10 4:14 
AnswerRepost Pin
Not Active23-Mar-10 4:24
mentorNot Active23-Mar-10 4:24 
Questionregarding regular expression & replace? Pin
Tridip Bhattacharjee23-Mar-10 3:50
professionalTridip Bhattacharjee23-Mar-10 3:50 
AnswerRe: regarding regular expression & replace? Pin
OriginalGriff23-Mar-10 4:26
mveOriginalGriff23-Mar-10 4:26 
QuestionAccess MDI form variable in another child form Pin
Ajay Sadyal23-Mar-10 3:48
Ajay Sadyal23-Mar-10 3:48 
AnswerRe: Access MDI form variable in another child form Pin
OriginalGriff23-Mar-10 4:37
mveOriginalGriff23-Mar-10 4:37 
Questionargument into threading function by ref Pin
igalep13223-Mar-10 3:39
igalep13223-Mar-10 3:39 
hey,

i need to fill two dictionaries with data, so i send each dictionary from one class to MultiThreaded Class by ref...
here how it's looks like

public EnglishDataBase()
        {
            MultiThread mt = new MultiThread();

            englishCapLetter = new Dictionary<char, int>();
            englishSmallLetter = new Dictionary<char, int>();

            Thread t1 = new Thread(new ThreadStart(mt.fillCaps(ref englishCapLetter))));
            Thread t2 = new Thread(new ThreadStart(mt.fillUnCaps(ref englishSmallLetter)));
            

            t1.Start();
            t2.Start();
            t1.Join();
            t2.Join();
        }

public void fillCaps(ref Dictionary<char, int> englishCapLetter)
        {
            while (!sr1.EndOfStream)
            {
                string letter = sr1.ReadLine();
                englishCapLetter.Add(char.Parse(letter.ToUpper()), char.Parse(letter.ToUpper()));
            }
        }

        public void fillUnCaps(ref Dictionary<char, int> englishSmallLetter)
        {
            while (!sr2.EndOfStream)
            {
                string letter = sr2.ReadLine();
                englishSmallLetter.Add(char.Parse(letter.ToLower()), char.Parse(letter.ToLower()));
            }
        }


but then i get a "Method name expected" in t1 and t2 creation compilation error...
what's wrong with implementation i did ?

tanks in advance
AnswerRe: argument into threading function by ref Pin
Not Active23-Mar-10 4:02
mentorNot Active23-Mar-10 4:02 
GeneralRe: argument into threading function by ref Pin
igalep13223-Mar-10 4:09
igalep13223-Mar-10 4:09 
GeneralRe: argument into threading function by ref Pin
Not Active23-Mar-10 4:15
mentorNot Active23-Mar-10 4:15 
GeneralRe: argument into threading function by ref Pin
igalep13223-Mar-10 4:22
igalep13223-Mar-10 4:22 
AnswerRe: argument into threading function by ref Pin
Covean23-Mar-10 4:07
Covean23-Mar-10 4:07 
GeneralRe: argument into threading function by ref Pin
igalep13223-Mar-10 7:26
igalep13223-Mar-10 7:26 
AnswerRe: argument into threading function by ref Pin
Luc Pattyn23-Mar-10 8:00
sitebuilderLuc Pattyn23-Mar-10 8:00 
GeneralRe: argument into threading function by ref Pin
igalep13223-Mar-10 8:02
igalep13223-Mar-10 8:02 
GeneralRe: argument into threading function by ref Pin
Luc Pattyn23-Mar-10 8:40
sitebuilderLuc Pattyn23-Mar-10 8:40 
GeneralRe: argument into threading function by ref Pin
Not Active23-Mar-10 8:44
mentorNot Active23-Mar-10 8:44 
GeneralRe: argument into threading function by ref Pin
Luc Pattyn23-Mar-10 8:46
sitebuilderLuc Pattyn23-Mar-10 8:46 
GeneralRe: argument into threading function by ref Pin
Not Active23-Mar-10 9:04
mentorNot Active23-Mar-10 9:04 
GeneralRe: argument into threading function by ref Pin
Luc Pattyn23-Mar-10 9:18
sitebuilderLuc Pattyn23-Mar-10 9:18 
GeneralRe: argument into threading function by ref Pin
Not Active23-Mar-10 8:43
mentorNot Active23-Mar-10 8:43 
GeneralRe: argument into threading function by ref Pin
igalep13223-Mar-10 8:46
igalep13223-Mar-10 8:46 
GeneralRe: argument into threading function by ref Pin
Not Active23-Mar-10 9:32
mentorNot Active23-Mar-10 9:32 
GeneralRe: argument into threading function by ref Pin
igalep13223-Mar-10 10:57
igalep13223-Mar-10 10:57 

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.