Click here to Skip to main content
15,896,912 members
Home / Discussions / C#
   

C#

 
QuestionForeign key UniqueIdentifier Pin
tek 20096-Jul-10 23:59
tek 20096-Jul-10 23:59 
AnswerRe: Foreign key UniqueIdentifier Pin
PIEBALDconsult7-Jul-10 3:22
mvePIEBALDconsult7-Jul-10 3:22 
AnswerRe: Foreign key UniqueIdentifier Pin
tek 20097-Jul-10 4:19
tek 20097-Jul-10 4:19 
AnswerRe: Foreign key UniqueIdentifier Pin
Bernhard Hiller7-Jul-10 3:57
Bernhard Hiller7-Jul-10 3:57 
QuestionHelp! URGENT Pin
Ice_Freez056-Jul-10 22:44
Ice_Freez056-Jul-10 22:44 
AnswerSuggestion PinPopular
DaveyM696-Jul-10 22:53
professionalDaveyM696-Jul-10 22:53 
GeneralRe: Suggestion Pin
Ice_Freez057-Jul-10 15:23
Ice_Freez057-Jul-10 15:23 
QuestionCollection remove Pin
MayukhSen6-Jul-10 22:34
MayukhSen6-Jul-10 22:34 
Hi i have created a generic collection . I have My custom class.
When i am adding objs of my custom class in the collection .I am not able to
Search remove from the collection even i contains() method is not working .Can u plz Tell me where i am wrong. Or How should i do this.

public class GCommon<T> : Collection<T> where T : ICommonInterface
   {

       new public void  Add(T item)
       {
           if(!base.Contains(item))
               base.Add(item);

       }
       public void Clear(T item)
       {
           foreach (T it in base.Items)
           {
               if(it.Equals(item))
                   base.Remove(item);
           }
       }
       new public bool Contains(T item)
       {
           bool retval = false;
           foreach (T itm in base.Items)
               if (itm.Equals(item))
               {
                   retval = true;
                   break;
               }
           return retval;
       }


   }

   public interface ICommonInterface
   {
   }


   public class clsContent : ICommonInterface
   {
       public clsContent()
       {

       }

       public clsContent(int id,string Name, string Content)
       {
           _Id = id;
           _ContentName = Name;
           _Content = Content;
       }

       private int _Id;
       public int Id
       {
           get { return _Id; }
           set { _Id = value; }
       }

       private string _ContentName;
       public string ContentName
       {
           get { return _ContentName; }
           set { _ContentName = value; }
       }

       private string _Content;
       public string Content
       {
           get { return _Content; }
           set { _Content = value; }
       }

   }

AnswerRe: Collection remove Pin
Dave Kreskowiak7-Jul-10 1:37
mveDave Kreskowiak7-Jul-10 1:37 
GeneralRe: Collection remove Pin
MayukhSen7-Jul-10 2:02
MayukhSen7-Jul-10 2:02 
GeneralRe: Collection remove Pin
Pete O'Hanlon7-Jul-10 2:38
mvePete O'Hanlon7-Jul-10 2:38 
QuestionRemote desktop server/client Pin
Sajjad Izadi6-Jul-10 21:05
Sajjad Izadi6-Jul-10 21:05 
AnswerRe: Remote desktop server/client Pin
Richard MacCutchan6-Jul-10 21:39
mveRichard MacCutchan6-Jul-10 21:39 
AnswerRe: Remote desktop server/client Pin
Gonzalo Cao6-Jul-10 21:41
Gonzalo Cao6-Jul-10 21:41 
AnswerRe: Remote desktop server/client Pin
Abhinav S6-Jul-10 21:41
Abhinav S6-Jul-10 21:41 
GeneralRe: Remote desktop server/client Pin
JHizzle6-Jul-10 22:00
JHizzle6-Jul-10 22:00 
QuestionDisplay messages, when using windows services Pin
ayandelhi6-Jul-10 19:28
ayandelhi6-Jul-10 19:28 
AnswerRe: Display messages, when using windows services Pin
Peace ON6-Jul-10 20:31
Peace ON6-Jul-10 20:31 
GeneralRe: Display messages, when using windows services Pin
Gonzalo Cao6-Jul-10 20:37
Gonzalo Cao6-Jul-10 20:37 
AnswerRe: Display messages, when using windows services Pin
Luc Pattyn6-Jul-10 23:36
sitebuilderLuc Pattyn6-Jul-10 23:36 
GeneralRe: Display messages, when using windows services Pin
Rod Kemp12-Jul-10 16:15
Rod Kemp12-Jul-10 16:15 
AnswerRe: Display messages, when using windows services Pin
Jammer6-Jul-10 22:21
Jammer6-Jul-10 22:21 
AnswerRe: Display messages, when using windows services Pin
geo_m8-Jul-10 1:33
geo_m8-Jul-10 1:33 
QuestionUsing Registry Keys Pin
Richard Blythe6-Jul-10 12:27
Richard Blythe6-Jul-10 12:27 
AnswerRe: Using Registry Keys Pin
Manas Bhardwaj6-Jul-10 12:34
professionalManas Bhardwaj6-Jul-10 12:34 

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.