Click here to Skip to main content
15,910,009 members
Home / Discussions / C#
   

C#

 
GeneralRe: Regular Expresion Pin
HerbCSO3-May-07 23:33
HerbCSO3-May-07 23:33 
QuestionRe: Regular Expresion Pin
Asif Mushtaq4-May-07 0:12
Asif Mushtaq4-May-07 0:12 
AnswerRe: Regular Expresion Pin
HerbCSO4-May-07 0:46
HerbCSO4-May-07 0:46 
JokeRe: Regular Expresion Pin
Asif Mushtaq4-May-07 0:51
Asif Mushtaq4-May-07 0:51 
QuestionRequesting WebPage using TCPClient Pin
SakthiSurya3-May-07 19:27
SakthiSurya3-May-07 19:27 
AnswerRe: Requesting WebPage using TCPClient Pin
SakthiSurya3-May-07 21:48
SakthiSurya3-May-07 21:48 
AnswerRe: Requesting WebPage using TCPClient Pin
Herman<T>.Instance3-May-07 23:29
Herman<T>.Instance3-May-07 23:29 
GeneralRe: Requesting WebPage using TCPClient Pin
SakthiSurya4-May-07 2:18
SakthiSurya4-May-07 2:18 
GeneralRe: Requesting WebPage using TCPClient Pin
Herman<T>.Instance6-May-07 22:07
Herman<T>.Instance6-May-07 22:07 
QuestionRegistry Editor Pin
Paramhans Dubey3-May-07 19:17
professionalParamhans Dubey3-May-07 19:17 
AnswerRe: Registry Editor Pin
Shajeel3-May-07 20:29
Shajeel3-May-07 20:29 
QuestionIndexers in c# Pin
Raheem MA3-May-07 18:43
Raheem MA3-May-07 18:43 
AnswerRe: Indexers in c# Pin
Sandeep Akhare3-May-07 20:07
Sandeep Akhare3-May-07 20:07 
Questionregarding listbox C# Pin
giribabu2343-May-07 18:42
giribabu2343-May-07 18:42 
AnswerRe: regarding listbox C# Pin
Sandeep Akhare3-May-07 20:02
Sandeep Akhare3-May-07 20:02 
QuestionDisplay a web control Link button in a html tag Pin
minlynn3-May-07 16:52
minlynn3-May-07 16:52 
AnswerRe: Display a web control Link button in a html tag Pin
Sandeep Akhare3-May-07 20:11
Sandeep Akhare3-May-07 20:11 
GeneralRe: Display a web control Link button in a html tag Pin
minlynn6-May-07 18:27
minlynn6-May-07 18:27 
QuestionSorting a collection of classes [modified] Pin
hpjchobbes3-May-07 16:34
hpjchobbes3-May-07 16:34 
Please note, I am still learning!

I have a class that holds information about an object. I have another class that I would like to manage a collection of those objects. What I am trying to do is when a user updates some values for an object, that the manager then resorts the order of the collection automatically. I would also like to include an ability to 'lock' the sorting so a user could do a batch of changes and then sort at the end. I was looking at delegates, but I am not sure they are what I need. In fact, I am not even sure that what I want to do is really possible. Here is a basic example of what I am trying to do:

class cThing
{
  private float _depth;

  public float Depth
  {
    set
    {
       _depth = value;
       // Here is where I would tell my manager to resort the list
    }
  }
}

class cThingManager
{
  public List<cThing> MyThings = new List<cThing>();

  public void Sort()
  {
    MyThings.Sort();
  }

}


I would imagine this is possible, but I don't know what it would be called so I've been having a hard time searching for information on this. Any help is appreciated!

Edit - I figured out how to do the locking!
-- modified at 22:50 Thursday 3rd May, 2007
AnswerRe: Sorting a collection of classes Pin
Stefan Troschuetz3-May-07 21:07
Stefan Troschuetz3-May-07 21:07 
AnswerRe: Sorting a collection of classes Pin
Jon Hulatt3-May-07 21:11
Jon Hulatt3-May-07 21:11 
AnswerRe: Sorting a collection of classes Pin
AFSEKI7-May-07 4:01
AFSEKI7-May-07 4:01 
QuestionC#, DWM, and Window Image Capture (Vista) Pin
surrealmadrid3-May-07 12:22
surrealmadrid3-May-07 12:22 
Questionimage to string and backwords.. Pin
Seishin#3-May-07 11:33
Seishin#3-May-07 11:33 
AnswerRe: image to string and backwords.. Pin
Luc Pattyn3-May-07 11:47
sitebuilderLuc Pattyn3-May-07 11:47 

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.