Click here to Skip to main content
15,902,032 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to retrive client machine name in c# Class Pin
Guffa13-Nov-08 1:44
Guffa13-Nov-08 1:44 
Questionconversion from double to float Pin
madeline_veda13-Nov-08 0:31
madeline_veda13-Nov-08 0:31 
AnswerRe: conversion from double to float Pin
DaveyM6913-Nov-08 1:01
professionalDaveyM6913-Nov-08 1:01 
AnswerRe: conversion from double to float Pin
PIEBALDconsult13-Nov-08 3:23
mvePIEBALDconsult13-Nov-08 3:23 
AnswerRe: conversion from double to float Pin
Ennis Ray Lynch, Jr.13-Nov-08 3:27
Ennis Ray Lynch, Jr.13-Nov-08 3:27 
GeneralRe: conversion from double to float Pin
CPallini13-Nov-08 3:46
mveCPallini13-Nov-08 3:46 
GeneralRe: conversion from double to float Pin
madeline_veda13-Nov-08 19:51
madeline_veda13-Nov-08 19:51 
QuestionActive Directory Reset password - able to login with both old password and new password [modified] Pin
Sudhir Mangla13-Nov-08 0:27
professionalSudhir Mangla13-Nov-08 0:27 
AnswerRe: Active Directory Reset password - able to login with both old password and new password Pin
Dave Kreskowiak13-Nov-08 4:59
mveDave Kreskowiak13-Nov-08 4:59 
GeneralRe: Active Directory Reset password - able to login with both old password and new password Pin
Sudhir Mangla14-Nov-08 1:06
professionalSudhir Mangla14-Nov-08 1:06 
AnswerRe: Active Directory Reset password - able to login with both old password and new password Pin
kakarato31-Mar-11 21:33
kakarato31-Mar-11 21:33 
Questionpinting text file using c#.net for web application Pin
anithagaraga12-Nov-08 23:59
anithagaraga12-Nov-08 23:59 
AnswerRe: pinting text file using c#.net for web application Pin
DaveyM6913-Nov-08 1:04
professionalDaveyM6913-Nov-08 1:04 
Questionno duplicates in array Pin
duta12-Nov-08 22:57
duta12-Nov-08 22:57 
AnswerRe: no duplicates in array Pin
Giorgi Dalakishvili12-Nov-08 23:15
mentorGiorgi Dalakishvili12-Nov-08 23:15 
AnswerRe: no duplicates in array Pin
#realJSOP12-Nov-08 23:55
professional#realJSOP12-Nov-08 23:55 
First, I'd use a List instead of an array because a List can grow dynamically, and will only be as large as is required to store your data. To avoid duplicates, you could do this:

List<string> dictionary = new List<string>()

// get the next sentence to process (you have to write 
// the GetNextSentence function)
string sentence = GetNextSentence();
// split the sentence into words
string[] words = sentence.ToLower().Split(' ');
// for each word
for (int i = 0; i < words.Length; i++)
{
    // if it's not already in the dictionary using the 
    // List.Contains method
    if (!dictionary.Contains(words[i])
    {
        // add it to the dictionary
        dictionary.Add(words[i]);
    }
}



"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


GeneralRe: no duplicates in array Pin
Guffa13-Nov-08 0:10
Guffa13-Nov-08 0:10 
GeneralRe: no duplicates in array Pin
J4amieC13-Nov-08 0:14
J4amieC13-Nov-08 0:14 
GeneralRe: no duplicates in array Pin
Simon P Stevens13-Nov-08 1:09
Simon P Stevens13-Nov-08 1:09 
GeneralRe: no duplicates in array Pin
J4amieC13-Nov-08 2:40
J4amieC13-Nov-08 2:40 
AnswerRe: no duplicates in array [modified] Pin
DaveyM6913-Nov-08 0:12
professionalDaveyM6913-Nov-08 0:12 
GeneralRe: no duplicates in array Pin
duta13-Nov-08 2:55
duta13-Nov-08 2:55 
AnswerRe: no duplicates in array Pin
Simon P Stevens13-Nov-08 1:14
Simon P Stevens13-Nov-08 1:14 
GeneralRe: no duplicates in array Pin
DaveyM6913-Nov-08 1:38
professionalDaveyM6913-Nov-08 1:38 
QuestionCheck SQL Server is installed Pin
Yulianto.12-Nov-08 22:39
Yulianto.12-Nov-08 22:39 

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.