Click here to Skip to main content
15,914,500 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to convert list to dictionary Pin
Luc Pattyn31-Jul-09 9:18
sitebuilderLuc Pattyn31-Jul-09 9:18 
GeneralRe: how to convert list to dictionary Pin
Henry Minute31-Jul-09 9:22
Henry Minute31-Jul-09 9:22 
GeneralRe: how to convert list to dictionary Pin
Luc Pattyn31-Jul-09 10:01
sitebuilderLuc Pattyn31-Jul-09 10:01 
GeneralRe: how to convert list to dictionary Pin
Henry Minute31-Jul-09 10:11
Henry Minute31-Jul-09 10:11 
GeneralRe: how to convert list to dictionary Pin
Luc Pattyn31-Jul-09 10:29
sitebuilderLuc Pattyn31-Jul-09 10:29 
GeneralRe: how to convert list to dictionary Pin
Dan Neely31-Jul-09 9:26
Dan Neely31-Jul-09 9:26 
AnswerRe: how to convert list to dictionary Pin
Super Lloyd31-Jul-09 4:18
Super Lloyd31-Jul-09 4:18 
GeneralRe: how to convert list to dictionary Pin
hotthoughtguy31-Jul-09 4:28
hotthoughtguy31-Jul-09 4:28 
StreamReader bfr = File.OpenText(@"D:\Documents and Settings\home\Desktop\normal.txt");
Dictionary < string , int > dic = new Dictionary < string , int > ();
string[] str = bfr.ReadToEnd().Replace("\r","").Replace("\n"," ").Replace(" "," ").Split(' ');
int var = 1;
foreach (string i in str)
{
if(dic.TryGetValue(i,out var))
dic[i]++;
else
dic.Add(i,1);
}
foreach(KeyValuePair < string , int > i in dic)
if(i.Value > 1)
Console.WriteLine(i.Key + " " + i.Value);
Console.ReadLine();




THIS WAS THE TASK BUT I HAVE DONE IT USING LOOP.
I WANT IT TO BE DONE without USING LOOP
AnswerRe: how to convert list to dictionary Pin
0x3c031-Jul-09 4:38
0x3c031-Jul-09 4:38 
GeneralRe: how to convert list to dictionary Pin
hotthoughtguy31-Jul-09 4:44
hotthoughtguy31-Jul-09 4:44 
AnswerRe: how to convert list to dictionary Pin
Dave Kreskowiak31-Jul-09 5:05
mveDave Kreskowiak31-Jul-09 5:05 
QuestionProgrammatically updating application properties or help creating my own xml file please. Pin
JollyMansArt31-Jul-09 2:51
JollyMansArt31-Jul-09 2:51 
AnswerRe: Programmatically updating application properties or help creating my own xml file please. Pin
Super Lloyd31-Jul-09 2:55
Super Lloyd31-Jul-09 2:55 
GeneralRe: Programmatically updating application properties or help creating my own xml file please. Pin
Henry Minute31-Jul-09 3:57
Henry Minute31-Jul-09 3:57 
GeneralRe: Programmatically updating application properties or help creating my own xml file please. Pin
Super Lloyd31-Jul-09 4:03
Super Lloyd31-Jul-09 4:03 
JokeRe: Programmatically updating application properties or help creating my own xml file please. Pin
JollyMansArt1-Aug-09 2:33
JollyMansArt1-Aug-09 2:33 
GeneralRe: Programmatically updating application properties or help creating my own xml file please. Pin
Super Lloyd1-Aug-09 16:53
Super Lloyd1-Aug-09 16:53 
Questionnot able to view the form controls when thread is running [modified] Pin
Vivek Vijayan31-Jul-09 2:37
Vivek Vijayan31-Jul-09 2:37 
AnswerRe: not able to view the form controls when thread is running Pin
stancrm31-Jul-09 3:30
stancrm31-Jul-09 3:30 
QuestionHow to increase Web Service performance ? Pin
hdv21231-Jul-09 2:35
hdv21231-Jul-09 2:35 
AnswerRe: How to increase Web Service performance ? Pin
Dave Kreskowiak31-Jul-09 4:58
mveDave Kreskowiak31-Jul-09 4:58 
GeneralRe: How to increase Web Service performance ? Pin
hdv21231-Jul-09 6:37
hdv21231-Jul-09 6:37 
GeneralRe: How to increase Web Service performance ? Pin
Dave Kreskowiak31-Jul-09 7:28
mveDave Kreskowiak31-Jul-09 7:28 
GeneralRe: How to increase Web Service performance ? Pin
hdv2121-Aug-09 9:21
hdv2121-Aug-09 9:21 
GeneralRe: How to increase Web Service performance ? Pin
Dave Kreskowiak2-Aug-09 6:12
mveDave Kreskowiak2-Aug-09 6:12 

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.