Basic Sorting Question - C# - (Java Programmer Learning C#) -


I'm working on sorting a list of items, and unfortunately, I'm not getting enough information from debugging See where I'm going.

I have a custom class that I have implemented a comparison method, and I call. Class () calls on the list of items of that class. Unfortunately, my program does not really get the comparison () method ... to call it down errors and shutdowns immediately. Source ().

How should I generally look?

Here is the Definition of Class, Interface List.

  /// & lt; Summary & gt; /// Client Works Space Summary Description /// & lt; / Summary & gt; Public class client workspace: iterative {}  

I did not list the method of comparison because it never goes to that code.

I believe the exception message will be something like this: "At least one object has an ICP interface Must be implemented "with an inevitable" failed to compare two elements in the array ". It tells you what you want:

You have not declared your class to implement the IComperBarbill interface.

This is not enough to just implement the compare method, because the sorting algorithm IComparable will try to call the interface Before compare will look through that interface.

... and this is the reason that your way is not being called.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -