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

C#

 
GeneralRe: Sorting Array of objects [modified] Pin
Robert Rohde23-May-06 22:24
Robert Rohde23-May-06 22:24 
GeneralRe: Sorting Array of objects [modified] Pin
Rizwan Rathore23-May-06 23:05
Rizwan Rathore23-May-06 23:05 
GeneralRe: Sorting Array of objects [modified] Pin
Robert Rohde23-May-06 23:13
Robert Rohde23-May-06 23:13 
GeneralRe: Sorting Array of objects [modified] Pin
Rizwan Rathore23-May-06 23:40
Rizwan Rathore23-May-06 23:40 
GeneralRe: Sorting Array of objects [modified] Pin
Robert Rohde24-May-06 0:12
Robert Rohde24-May-06 0:12 
GeneralRe: Sorting Array of objects [modified] Pin
Rizwan Rathore24-May-06 0:54
Rizwan Rathore24-May-06 0:54 
AnswerRe: Sorting Array of objects Pin
BoneSoft23-May-06 4:20
BoneSoft23-May-06 4:20 
GeneralRe: Sorting Array of objects Pin
Rizwan Rathore23-May-06 14:11
Rizwan Rathore23-May-06 14:11 
Hi Sir,
when i am trying to do this in this way

public class WordComparer : IComparer
{
	
	public int Compare(object x, object y) 
	{			
		Terminology w1 = x as Terminology;			
		Terminology w2 = y as Terminology;			
		if (w1 == null || w2 == null) { return 0; }		
		return w1.term.CompareTo(w2.term);		
	}
}

public class TextMiner : System.Windows.Forms.Form 
{
                some code here........
                public Terminology[] word = new Terminology[WORDS];
                public void Indexer()
                {
                        Array.Sort(word, new WordComparer()); 
                }
}


well it compiles fine but when i try to access the objects of that sorted class it gives null object reference exception

for(int i = 0; i < Terminology.Count; i ++)
{
        do something with word[i];
}


well this exception comes when the value of i is 0......and the program was working perfectly fine b4 that.....
Looking forward for help
Regards,
GeneralRe: Sorting Array of objects Pin
BoneSoft23-May-06 15:10
BoneSoft23-May-06 15:10 
GeneralRe: Sorting Array of objects Pin
Robert Rohde23-May-06 19:42
Robert Rohde23-May-06 19:42 
GeneralRe: Sorting Array of objects Pin
BoneSoft24-May-06 1:31
BoneSoft24-May-06 1:31 
GeneralRe: Sorting Array of objects Pin
Rizwan Rathore23-May-06 21:13
Rizwan Rathore23-May-06 21:13 
QuestionNovell GroupWise Pin
NewbieDude22-May-06 23:32
NewbieDude22-May-06 23:32 
QuestionListView.ShowGroups=TRUE [modified] Pin
Greeky22-May-06 23:21
Greeky22-May-06 23:21 
QuestionProblems with HDC Pin
__makaveli__22-May-06 23:16
__makaveli__22-May-06 23:16 
QuestionHow to view a Flash file in C# Pin
nps_ltv22-May-06 23:12
nps_ltv22-May-06 23:12 
AnswerRe: How to view a Flash file in C# Pin
Saqib Mehmood23-May-06 1:57
Saqib Mehmood23-May-06 1:57 
GeneralRe: How to view a Flash file in C# Pin
nps_ltv25-May-06 0:22
nps_ltv25-May-06 0:22 
GeneralRe: How to view a Flash file in C# Pin
Saqib Mehmood25-May-06 0:40
Saqib Mehmood25-May-06 0:40 
Questionset tile ,author name to image in c# Pin
sreesiri22-May-06 23:00
sreesiri22-May-06 23:00 
AnswerRe: set tile ,author name to image in c# Pin
stancrm22-May-06 23:27
stancrm22-May-06 23:27 
GeneralRe: set tile ,author name to image in c# Pin
sreesiri23-May-06 21:02
sreesiri23-May-06 21:02 
QuestionWhich Port Xp uses when we Access a Shared Folder over a network Pin
majidbhutta22-May-06 21:44
majidbhutta22-May-06 21:44 
AnswerRe: Which Port Xp uses when we Access a Shared Folder over a network Pin
stancrm22-May-06 21:47
stancrm22-May-06 21:47 
QuestionHelp On Float Toolbox in C#. Pin
RezaAsAdi22-May-06 20:07
RezaAsAdi22-May-06 20:07 

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.