Click here to Skip to main content
15,888,113 members
Home / Discussions / C#
   

C#

 
GeneralImages in MainMenu or Popup menu Pin
flyingv5-May-03 18:56
flyingv5-May-03 18:56 
GeneralRe: Images in MainMenu or Popup menu Pin
Kant6-May-03 16:41
Kant6-May-03 16:41 
QuestionHow to get Calling exe resources in a DLL Pin
Ranjan Banerji5-May-03 11:27
Ranjan Banerji5-May-03 11:27 
AnswerRe: How to get Calling exe resources in a DLL Pin
Ranjan Banerji5-May-03 13:53
Ranjan Banerji5-May-03 13:53 
GeneralClearing checked items in a CheckedListBox Pin
Mark Kimball5-May-03 10:59
Mark Kimball5-May-03 10:59 
GeneralRe: Clearing checked items in a CheckedListBox Pin
Kant6-May-03 8:54
Kant6-May-03 8:54 
GeneralRe: Clearing checked items in a CheckedListBox Pin
Mark Kimball6-May-03 9:36
Mark Kimball6-May-03 9:36 
GeneralCollection Sort Performance Pin
Mark Sanders5-May-03 9:30
Mark Sanders5-May-03 9:30 
I am creating a strongly-typed collection class for a custom class using the CollectionBase class. I have added a Sort() function to the class with the following description:
public void Sort()
{
    myClass[] tempArray = new myClass[List.Count];
    tempArray.Initialize();
    List.CopyTo(tempArray, 0);

    Array.Sort(tempArray);

    List.Clear();
    foreach(myClass val in tempArray)
        List.Add(val);
}
Is there a better way to do this, performance wise? Or is this implementation a decent one?

FYI: The list count for this collection will be very large when used in the application.

Mark Sanders
sanderssolutions.com
GeneralRe: Collection Sort Performance Pin
Daniel Turini5-May-03 9:37
Daniel Turini5-May-03 9:37 
GeneralRe: Collection Sort Performance Pin
Mark Sanders5-May-03 9:40
Mark Sanders5-May-03 9:40 
GeneralRe: Collection Sort Performance Pin
James T. Johnson5-May-03 9:43
James T. Johnson5-May-03 9:43 
GeneralRe: Collection Sort Performance Pin
leppie5-May-03 15:13
leppie5-May-03 15:13 
GeneralRe: Collection Sort Performance Pin
Daniel Turini6-May-03 0:38
Daniel Turini6-May-03 0:38 
Generalcontrolling datagrid rows addition Pin
shoe-seal5-May-03 7:47
shoe-seal5-May-03 7:47 
Generalaspnet_wp.exe hangs Pin
Manish K. Agarwal5-May-03 4:30
Manish K. Agarwal5-May-03 4:30 
GeneralRe: aspnet_wp.exe hangs Pin
Paresh Gheewala5-May-03 5:56
Paresh Gheewala5-May-03 5:56 
Generalbrowser Pin
toanlb4-May-03 23:41
toanlb4-May-03 23:41 
GeneralRe: browser Pin
Stephane Rodriguez.5-May-03 3:09
Stephane Rodriguez.5-May-03 3:09 
GeneralRe: browser Pin
toanlb5-May-03 4:42
toanlb5-May-03 4:42 
GeneralRe: browser Pin
Stephane Rodriguez.5-May-03 5:15
Stephane Rodriguez.5-May-03 5:15 
QuestionI need to convert a string variable to an array of integers ? Pin
fdc4-May-03 23:30
fdc4-May-03 23:30 
AnswerRe: I need to convert a string variable to an array of integers ? Pin
fdc4-May-03 23:47
fdc4-May-03 23:47 
AnswerRe: I need to convert a string variable to an array of integers ? Pin
Daniel Turini5-May-03 9:39
Daniel Turini5-May-03 9:39 
GeneralNotifyIcon in a Windows Service Pin
Emanuele Baglini4-May-03 12:16
Emanuele Baglini4-May-03 12:16 
GeneralRe: NotifyIcon in a Windows Service Pin
apferreira5-May-03 23:23
apferreira5-May-03 23:23 

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.