Click here to Skip to main content
15,895,667 members
Home / Discussions / C#
   

C#

 
GeneralRe: a really newbie, quick and easy question... Pin
leppie21-Aug-08 3:11
leppie21-Aug-08 3:11 
Questionapp.config I can't add or remuve values. Pin
daavena21-Aug-08 1:55
daavena21-Aug-08 1:55 
AnswerRe: app.config I can't add or remuve values. Pin
leppie21-Aug-08 2:14
leppie21-Aug-08 2:14 
Questionhow get diffreent from one to another audio codecs using DirectxCapture Pin
anishkannan21-Aug-08 1:34
anishkannan21-Aug-08 1:34 
AnswerRe: how get diffreent from one to another audio codecs using DirectxCapture Pin
Christian Graus21-Aug-08 1:47
protectorChristian Graus21-Aug-08 1:47 
Questionconvert .wav to raw Pin
zumty21-Aug-08 1:18
zumty21-Aug-08 1:18 
AnswerRe: convert .wav to raw Pin
Christian Graus21-Aug-08 1:51
protectorChristian Graus21-Aug-08 1:51 
QuestionAdd two numbers in Generic Pin
.NET- India 21-Aug-08 0:05
.NET- India 21-Aug-08 0:05 
Hello Frnds,

I want to add two numbers through Generic. Im giving my code here plz let me knw my mistake and also suggest the way to come out of this problem

static void Main(string[] args)
{

Addtion<int> e=new Addtion<int>();
e.get(10,20);

Addtion<double> e1=new Addtion<double>();
e1.get(2.5,5.2);

Console.ReadLine();
}


class Addtion<T>
{
public void get(T a,T b)
{
T c = a +b;
Console.WriteLine(c);
//Console.WriteLine(b);
}

}

It's throwing an error
Operator '+' cant be applied to operands of type 'T' and 'T'
AnswerRe: Add two numbers in Generic Pin
Christian Graus21-Aug-08 0:17
protectorChristian Graus21-Aug-08 0:17 
AnswerRe: Add two numbers in Generic Pin
Pete O'Hanlon21-Aug-08 1:48
mvePete O'Hanlon21-Aug-08 1:48 
AnswerRe: Add two numbers in Generic Pin
PIEBALDconsult21-Aug-08 3:20
mvePIEBALDconsult21-Aug-08 3:20 
QuestionException handling question Pin
Green Fuze20-Aug-08 22:51
Green Fuze20-Aug-08 22:51 
AnswerRe: Exception handling question Pin
Christian Graus20-Aug-08 23:18
protectorChristian Graus20-Aug-08 23:18 
QuestionMemory leaks tools Pin
tom groezer20-Aug-08 22:38
tom groezer20-Aug-08 22:38 
GeneralRe: Memory leaks tools Pin
selcuks20-Aug-08 22:50
selcuks20-Aug-08 22:50 
GeneralRe: Memory leaks tools Pin
tom groezer20-Aug-08 23:34
tom groezer20-Aug-08 23:34 
GeneralRe: Memory leaks tools Pin
leppie21-Aug-08 22:03
leppie21-Aug-08 22:03 
Questionstructure storage API Pin
Miss_hacker20-Aug-08 21:56
Miss_hacker20-Aug-08 21:56 
AnswerRe: structure storage API Pin
Christian Graus20-Aug-08 22:28
protectorChristian Graus20-Aug-08 22:28 
Questionstring comparasion Pin
AndieDu20-Aug-08 21:32
AndieDu20-Aug-08 21:32 
AnswerRe: string comparasion Pin
selcuks20-Aug-08 21:41
selcuks20-Aug-08 21:41 
GeneralRe: string comparasion Pin
AndieDu21-Aug-08 15:30
AndieDu21-Aug-08 15:30 
AnswerRe: string comparasion Pin
Christian Graus20-Aug-08 21:54
protectorChristian Graus20-Aug-08 21:54 
GeneralRe: string comparasion Pin
AndieDu21-Aug-08 15:31
AndieDu21-Aug-08 15:31 
QuestionA COM Interop Question Pin
Xiaoming Qian20-Aug-08 21:21
Xiaoming Qian20-Aug-08 21:21 

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.