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

C#

 
AnswerRe: c# Pin
ZurdoDev22-May-14 4:59
professionalZurdoDev22-May-14 4:59 
GeneralRe: c# Pin
Chris Quinn22-May-14 5:02
Chris Quinn22-May-14 5:02 
GeneralRe: c# Pin
ZurdoDev22-May-14 5:06
professionalZurdoDev22-May-14 5:06 
AnswerRe: c# Pin
Dave Kreskowiak22-May-14 4:19
mveDave Kreskowiak22-May-14 4:19 
GeneralRe: c# Pin
Shady George22-May-14 8:11
Shady George22-May-14 8:11 
AnswerRe: c# Pin
ZurdoDev22-May-14 5:00
professionalZurdoDev22-May-14 5:00 
AnswerRe: c# Pin
V.22-May-14 6:21
professionalV.22-May-14 6:21 
Questionusing generic on method Pin
Gilbert Consellado22-May-14 0:40
professionalGilbert Consellado22-May-14 0:40 
I tried this
C#
public sealed class sample
{
  public sample(){}

  public add(object item)
  {
     //process
  }

  public add<T>(T item)
  {
    PropertyInfo[] pi;
    // process
  }
}



now when i created new object of it and call the first add, i end up the second add has been called

sample

C#
sample s = new sample();
string newString = "sample string";
s.add(newString);


i try to debug it to track how the process goes but it called the add<t>(t item) method.

even in the intellisense, when i point my cursor the s.add(newString), it would say sample.add<string>(string item) something like that.

what is that happening?

i will appreciate for any help will come thank you
AnswerRe: using generic on method Pin
Pete O'Hanlon22-May-14 0:50
mvePete O'Hanlon22-May-14 0:50 
GeneralRe: using generic on method Pin
Gilbert Consellado22-May-14 0:58
professionalGilbert Consellado22-May-14 0:58 
GeneralRe: using generic on method Pin
Pete O'Hanlon22-May-14 1:01
mvePete O'Hanlon22-May-14 1:01 
GeneralRe: using generic on method Pin
Rob Philpott22-May-14 1:09
Rob Philpott22-May-14 1:09 
GeneralRe: using generic on method Pin
Gilbert Consellado22-May-14 1:20
professionalGilbert Consellado22-May-14 1:20 
GeneralRe: using generic on method Pin
Rob Philpott22-May-14 1:22
Rob Philpott22-May-14 1:22 
GeneralRe: using generic on method Pin
Richard Deeming22-May-14 2:00
mveRichard Deeming22-May-14 2:00 
GeneralRe: using generic on method Pin
Rob Philpott22-May-14 2:03
Rob Philpott22-May-14 2:03 
GeneralRe: using generic on method Pin
Pete O'Hanlon22-May-14 2:26
mvePete O'Hanlon22-May-14 2:26 
AnswerRe: using generic on method Pin
BobJanova22-May-14 1:58
BobJanova22-May-14 1:58 
QuestionRegarding .Net consultant Pin
Pramod Singh (C)21-May-14 19:06
professionalPramod Singh (C)21-May-14 19:06 
AnswerRe: Regarding .Net consultant Pin
Karen Mitchelle21-May-14 19:37
professionalKaren Mitchelle21-May-14 19:37 
AnswerRe: Regarding .Net consultant Pin
Bernhard Hiller21-May-14 21:42
Bernhard Hiller21-May-14 21:42 
AnswerRe: Regarding .Net consultant Pin
Richard MacCutchan21-May-14 21:56
mveRichard MacCutchan21-May-14 21:56 
AnswerRe: Regarding .Net consultant Pin
BobJanova22-May-14 2:01
BobJanova22-May-14 2:01 
AnswerRe: Regarding .Net consultant Pin
Dave Kreskowiak22-May-14 4:22
mveDave Kreskowiak22-May-14 4:22 
GeneralRe: Regarding .Net consultant Pin
Pete O'Hanlon22-May-14 6:47
mvePete O'Hanlon22-May-14 6: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.