Click here to Skip to main content
15,909,605 members
Home / Discussions / C#
   

C#

 
AnswerRe: Proper way to sort a List<> Custom objects Pin
Henry Minute30-Aug-09 10:42
Henry Minute30-Aug-09 10:42 
AnswerRe: Proper way to sort a List<> Custom objects Pin
DaveyM6930-Aug-09 11:08
professionalDaveyM6930-Aug-09 11:08 
AnswerRe: Proper way to sort a List<> Custom objects Pin
Luc Pattyn30-Aug-09 11:13
sitebuilderLuc Pattyn30-Aug-09 11:13 
AnswerRe: Proper way to sort a List<> Custom objects Pin
Luc Pattyn30-Aug-09 12:06
sitebuilderLuc Pattyn30-Aug-09 12:06 
GeneralRe: Proper way to sort a List<> Custom objects Pin
Dwayner7930-Aug-09 15:41
Dwayner7930-Aug-09 15:41 
QuestionC# List problem Pin
Charlesh330-Aug-09 9:50
Charlesh330-Aug-09 9:50 
AnswerRe: C# List problem Pin
Luc Pattyn30-Aug-09 10:25
sitebuilderLuc Pattyn30-Aug-09 10:25 
GeneralRe: C# List problem Pin
Charlesh330-Aug-09 12:37
Charlesh330-Aug-09 12:37 
Well that means that my effort to replace the < and others with the character was a big waste of time. Oddly, it appears correct for me: the correct characters are in the posting.

The FAQ doesn't mention PRE tags so hardware types like me will just gaze blankly at those words.

But let's try again. Rather than just copying and pasting the code into the Code Project window, I've saved it as a pure text file in hopes that will help. If not, I'll await instructions.


Chuck


public class CUserMem
{
public UInt32 bUsed; // supposed to be a Boolean but occupies 4 bytes
public UInt32 nCFreqHz; // Center Frequency
public UInt32 nDemIdx; // demod index: 4 or 5
public UInt32 nDemBWIdx; // normally 3 for 6 kHz
public UInt32 nVBFBWHz; // user selected filter BW (3.63 is a normal choice)
public Int32 nVBFFcHz; // frequency offset of filter
public UInt32 aTime; // long (epoch time when memory was created)
public byte version; // 0 currently
public Byte[] extDC; // 3 bytes of external downconverter info
public Byte[] rsvd; // 4 bytes reserved
public char[] desc; // memory tag
}

List <CUserMem> MemoryBank = new List<CUserMem>(10);


public Form1()
{
InitializeComponent();

for (i = 0; i < 100; i++)
{
CUserMem TempCUserMem = new CUserMem();
MemoryBank.Add(TempCUserMem);
}

<REST OF FORM1 WAS DELETED>


public void PackBank(decimal BankNumber)
{
for (i = 0; i < 100; i++)
{
if (MemoryBank[i].bUsed == 0)
{
for (j = i + 1; j < 100; j++)
{
if (MemoryBank[j].bUsed == 1)
{
MemoryBank[i] = MemoryBank[j];
MemoryBank[j].bUsed = 0;

// here, both the 9th and 10th memories (elements 8 and 9) are 0 while 0 to 7 are 1
MemoryBank[i].bUsed = 1;
// here, both the 9th and 10th memories are 1 and 0-7 continue to be 1
// a test using atime instead of bUsed shows the same problem
j = 100;
}
}
}
}
}
GeneralRe: C# List problem Pin
Luc Pattyn30-Aug-09 12:44
sitebuilderLuc Pattyn30-Aug-09 12:44 
AnswerRe: C# List problem Pin
OriginalGriff30-Aug-09 21:27
mveOriginalGriff30-Aug-09 21:27 
GeneralRe: C# List problem Pin
Charlesh331-Aug-09 17:26
Charlesh331-Aug-09 17:26 
GeneralRe: C# List problem Pin
OriginalGriff31-Aug-09 21:36
mveOriginalGriff31-Aug-09 21:36 
Questionfinding .resx fallback culture thru code [modified] Pin
yanairon30-Aug-09 6:00
yanairon30-Aug-09 6:00 
Question[Answered] Creating a list/collection containing different object types [modified] Pin
Trollslayer30-Aug-09 5:24
mentorTrollslayer30-Aug-09 5:24 
AnswerRe: Creating a list/collection containing different object types Pin
PIEBALDconsult30-Aug-09 5:34
mvePIEBALDconsult30-Aug-09 5:34 
GeneralRe: Creating a list/collection containing different object types Pin
Trollslayer30-Aug-09 6:16
mentorTrollslayer30-Aug-09 6:16 
GeneralRe: Creating a list/collection containing different object types Pin
Luc Pattyn30-Aug-09 6:29
sitebuilderLuc Pattyn30-Aug-09 6:29 
GeneralRe: Creating a list/collection containing different object types Pin
Trollslayer30-Aug-09 6:54
mentorTrollslayer30-Aug-09 6:54 
GeneralRe: Creating a list/collection containing different object types Pin
Luc Pattyn30-Aug-09 10:26
sitebuilderLuc Pattyn30-Aug-09 10:26 
QuestionUDP - Server (EndReceiveFrom) doesn't work Pin
softwarejaeger30-Aug-09 5:16
softwarejaeger30-Aug-09 5:16 
QuestionJob market Aussie ??? Pin
UBX30-Aug-09 4:02
UBX30-Aug-09 4:02 
AnswerRe: Job market Aussie ??? Pin
Abhishek Sur30-Aug-09 6:29
professionalAbhishek Sur30-Aug-09 6:29 
GeneralRe: Job market Aussie ??? Pin
UBX30-Aug-09 9:08
UBX30-Aug-09 9:08 
GeneralRe: Job market Aussie ??? Pin
DaveyM6930-Aug-09 11:11
professionalDaveyM6930-Aug-09 11:11 
AnswerRe: Job market Aussie ??? Pin
Joe Woodbury30-Aug-09 11:38
professionalJoe Woodbury30-Aug-09 11:38 

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.