Click here to Skip to main content
15,900,511 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataGridBoolColumn Question Pin
lior654#hotmail.com17-Jan-06 4:03
lior654#hotmail.com17-Jan-06 4:03 
GeneralRe: DataGridBoolColumn Question Pin
Robert Rohde17-Jan-06 8:15
Robert Rohde17-Jan-06 8:15 
GeneralRe: DataGridBoolColumn Question Pin
lior654#hotmail.com17-Jan-06 11:02
lior654#hotmail.com17-Jan-06 11:02 
GeneralRe: DataGridBoolColumn Question Pin
Robert Rohde18-Jan-06 0:17
Robert Rohde18-Jan-06 0:17 
QuestionHelp Needed in C# Chess Game development Pin
usmanali12314-Jan-06 10:40
usmanali12314-Jan-06 10:40 
AnswerRe: Help Needed in C# Chess Game development Pin
Christian Graus14-Jan-06 12:34
protectorChristian Graus14-Jan-06 12:34 
AnswerRe: Help Needed in C# Chess Game development Pin
Robert Rohde14-Jan-06 21:36
Robert Rohde14-Jan-06 21:36 
QuestionIEnumerator Pin
Duif14-Jan-06 10:17
Duif14-Jan-06 10:17 
Hi, can anyone help me with a IEnumerator-problem..?
I have this code that is a few year old, before the Generic.IEnumerator was changed, and now it will not work in Visual Studio 2005 Express:

using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace Kundekartotek
{
public class CKundekartotek
{
public CKundekartotek()
{
arrKunder = new ArrayList();
KundePegepind = 0;
}
public void NyKunde(string Navn, string Adr, string Tlf)
{
try
{
CKunde MinKunde = new CKunde(Navn, Adr, Tlf);
arrKunder.Add(MinKunde);
}
catch (Exception)
{
throw;
}
}
public void OpdaterKunde(int ID, string Navn, string Adr, string Tlf)
{
try
{
CKunde MinKunde = FindKunde(ID);
MinKunde.Opdater(Navn, Adr, Tlf);
}
catch (Exception)
{
throw;
}
}
public void SletKunde(int ID)
{
try
{
CKunde MinKunde;
MinKunde = FindKunde(ID);

arrKunder.Remove(MinKunde);
}
catch (Exception)
{
throw;
}
}
private CKunde FindKunde(int ID)
{
bool bStopIteration = false;
CKunde MinKunde = null;

IEnumerator<ckunde> MinEnumerator = arrKunder.GetEnumerator();
while (MinEnumerator.MoveNext() && bStopIteration == false)
{
MinKunde = (CKunde)MinEnumerator.Current;
if (MinKunde.ID == ID)
bStopIteration = true;
}
if (bStopIteration == true)
{
return MinKunde;
}
else
{
throw new CKartoteksException("Kunde ej fundet");
}
}

private int KundePegepind;

//FoersteKunde: Sæt pegepind til første kunde og returner denne
public CKunde FoersteKunde()
{
KundePegepind = 0;
if (arrKunder.Count == 0)
{
return null;
}
else
{
return ((CKunde)arrKunder[KundePegepind]);
}
}

//NaesteKunde: Sæt pegepind til næste kunde og returner denne
public CKunde NaesteKunde()
{
++KundePegepind;
if (KundePegepind >= arrKunder.Count)
{
--KundePegepind;
return null;
}
return ((CKunde)arrKunder[KundePegepind]);
}
}
}


Helge
GeneralRe: IEnumerator Pin
Guffa14-Jan-06 11:23
Guffa14-Jan-06 11:23 
GeneralRe: IEnumerator Pin
Duif14-Jan-06 11:38
Duif14-Jan-06 11:38 
GeneralRe: IEnumerator Pin
Judah Gabriel Himango14-Jan-06 12:19
sponsorJudah Gabriel Himango14-Jan-06 12:19 
GeneralRe: IEnumerator Pin
Duif15-Jan-06 3:57
Duif15-Jan-06 3:57 
GeneralRe: IEnumerator Pin
Duif15-Jan-06 4:08
Duif15-Jan-06 4:08 
AnswerRe: IEnumerator Pin
[Marc]14-Jan-06 12:07
[Marc]14-Jan-06 12:07 
QuestionListView columns not displayed Pin
Ravi Bhavnani14-Jan-06 10:14
professionalRavi Bhavnani14-Jan-06 10:14 
AnswerRe: ListView columns not displayed Pin
Joshua Quick14-Jan-06 12:46
Joshua Quick14-Jan-06 12:46 
GeneralRe: ListView columns not displayed Pin
Ravi Bhavnani14-Jan-06 13:24
professionalRavi Bhavnani14-Jan-06 13:24 
QuestionNeed help with a Windows Service Pin
Nathan R14-Jan-06 9:13
Nathan R14-Jan-06 9:13 
AnswerRe: Need help with a Windows Service Pin
Nathan R16-Jan-06 9:48
Nathan R16-Jan-06 9:48 
GeneralRe: Need help with a Windows Service Pin
BlackDice2-Feb-06 11:33
BlackDice2-Feb-06 11:33 
QuestionWrite to a text file Pin
aPerfectCircle14-Jan-06 8:43
aPerfectCircle14-Jan-06 8:43 
AnswerRe: Write to a text file Pin
User 665814-Jan-06 8:59
User 665814-Jan-06 8:59 
QuestionRemoting with localizable resources Pin
machocr14-Jan-06 8:07
machocr14-Jan-06 8:07 
QuestionSystem.Security.SecurityException Pin
OMalleyW14-Jan-06 5:23
OMalleyW14-Jan-06 5:23 
QuestionRe: System.Security.SecurityException Pin
shopi3014-Jan-06 12:31
shopi3014-Jan-06 12:31 

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.