Click here to Skip to main content
15,899,679 members
Home / Discussions / C#
   

C#

 
GeneralRe: Login Class for C# Pin
Christian Graus15-Feb-07 8:10
protectorChristian Graus15-Feb-07 8:10 
GeneralRe: Login Class for C# Pin
allan.gagnon15-Feb-07 8:45
allan.gagnon15-Feb-07 8:45 
QuestionGirdview Template field problem Pin
SharonRao14-Feb-07 13:42
SharonRao14-Feb-07 13:42 
QuestionStartup - Triggering events Pin
Glen Harvy14-Feb-07 12:56
Glen Harvy14-Feb-07 12:56 
AnswerRe: Startup - Triggering events Pin
Luc Pattyn14-Feb-07 14:59
sitebuilderLuc Pattyn14-Feb-07 14:59 
QuestionMaking a count of unique elements in an array Pin
TrooperIronMan14-Feb-07 12:34
TrooperIronMan14-Feb-07 12:34 
AnswerRe: Making a count of unique elements in an array Pin
Luc Pattyn14-Feb-07 12:43
sitebuilderLuc Pattyn14-Feb-07 12:43 
GeneralRe: Making a count of unique elements in an array Pin
TrooperIronMan14-Feb-07 14:28
TrooperIronMan14-Feb-07 14:28 
Great, got some solution on my own finally... though this sound better... I'll post mine in a so you can laugh bit... Big Grin | :-D Poke tongue | ;-P

but it does work...

<code> class Program
{
static void Main(string[] args)
{
ArrayList ResultList = new ArrayList();
int[] repeatCount = new int[5];
object[] originalObjectArray = new object[5];
Console.WriteLine("Enter array");
for (int i = 0; i < 5; i++)
originalObjectArray[i] = Console.ReadLine();
ResultList.Add(originalObjectArray[0]);
repeatCount[0] = 1;
int passCount = 0;
foreach (object o in originalObjectArray)
{
if (passCount > 0)
{
bool upis = true;
for (int i = 0; i < ResultList.Count; i++)
{
if (ResultList[i].Equals(o))
{
repeatCount[i] += 1;
upis = false;
}
}
if (upis == true)
{
ResultList.Add(o);
repeatCount[ResultList.Count - 1] = 1;
}
}
passCount++;
}
for (int l = 0; l <ResultList.Count; l++)
Console.WriteLine("Broj ponavljanja elemnta " + ResultList[l].ToString()
+ " je " +repeatCount[l].ToString());
}</code>

BTW how do I test if key is already in Hashtable?
GeneralRe: Making a count of unique elements in an array Pin
Luc Pattyn14-Feb-07 14:54
sitebuilderLuc Pattyn14-Feb-07 14:54 
GeneralRe: Making a count of unique elements in an array Pin
TrooperIronMan15-Feb-07 3:32
TrooperIronMan15-Feb-07 3:32 
GeneralRe: Making a count of unique elements in an array Pin
Guffa14-Feb-07 15:11
Guffa14-Feb-07 15:11 
GeneralRe: Making a count of unique elements in an array Pin
TrooperIronMan15-Feb-07 13:22
TrooperIronMan15-Feb-07 13:22 
QuestionFlash video files Pin
alostdruid14-Feb-07 11:18
alostdruid14-Feb-07 11:18 
QuestionSerial Communication using SerialDataReceivedEventHandler Pin
cocoonwls14-Feb-07 10:42
cocoonwls14-Feb-07 10:42 
QuestionCreate report ... Word / pdf or new form Pin
Rick van Woudenberg14-Feb-07 10:15
Rick van Woudenberg14-Feb-07 10:15 
AnswerRe: Create report ... Word / pdf or new form Pin
cocoonwls14-Feb-07 10:27
cocoonwls14-Feb-07 10:27 
QuestionCollection of objects Pin
Wayne Phipps14-Feb-07 9:38
Wayne Phipps14-Feb-07 9:38 
AnswerRe: Collection of objects Pin
Guffa14-Feb-07 11:30
Guffa14-Feb-07 11:30 
QuestionEscaping special characters in SQL Statement after form submission Pin
dboy22114-Feb-07 9:30
dboy22114-Feb-07 9:30 
AnswerRe: Escaping special characters in SQL Statement after form submission Pin
Wayne Phipps14-Feb-07 9:48
Wayne Phipps14-Feb-07 9:48 
AnswerRe: Escaping special characters in SQL Statement after form submission Pin
Abisodun14-Feb-07 9:55
Abisodun14-Feb-07 9:55 
Questionparsing dicom file Pin
rajuhero14-Feb-07 9:06
rajuhero14-Feb-07 9:06 
AnswerRe: parsing Pin
Colin Angus Mackay14-Feb-07 9:10
Colin Angus Mackay14-Feb-07 9:10 
QuestionHow to create folder by C#? Pin
abalbo14-Feb-07 8:53
abalbo14-Feb-07 8:53 
AnswerRe: How to create folder by C#? Pin
Stefan Troschuetz14-Feb-07 9:00
Stefan Troschuetz14-Feb-07 9:00 

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.