Click here to Skip to main content
15,890,506 members
Home / Discussions / C#
   

C#

 
GeneralRe: Implying method return type [modified] Pin
eggie51-Oct-07 19:07
eggie51-Oct-07 19:07 
GeneralRe: Implying method return type Pin
TJoe1-Oct-07 19:35
TJoe1-Oct-07 19:35 
GeneralRe: Implying method return type Pin
eggie51-Oct-07 19:42
eggie51-Oct-07 19:42 
AnswerRe: Implying method return type Pin
TJoe1-Oct-07 20:00
TJoe1-Oct-07 20:00 
GeneralRe: Implying method return type Pin
eggie51-Oct-07 20:10
eggie51-Oct-07 20:10 
GeneralRe: Implying method return type Pin
eggie51-Oct-07 20:57
eggie51-Oct-07 20:57 
GeneralRe: Implying method return type Pin
Pete O'Hanlon1-Oct-07 22:49
mvePete O'Hanlon1-Oct-07 22:49 
GeneralRe: Implying method return type Pin
DavidNohejl1-Oct-07 22:51
DavidNohejl1-Oct-07 22:51 
"Because not all objects are guaranteed to have public default constructors, the compiler does not allow you to call the default constructor on the type parameter. To override this compiler restriction, you add the text new() after all other constraints are specified. This text is a constructor constraint, and it forces the type parameter decorated with the constructor constraint to have a default constructor." (http://www.codeproject.com/books/EssentialCS20.asp[^])

Fix is easy, public Response Create<T>() where T : MyBaseClass, New()



[My Blog]
"Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe

GeneralRe: Implying method return type Pin
TJoe2-Oct-07 3:17
TJoe2-Oct-07 3:17 
GeneralRe: Implying method return type Pin
TJoe1-Oct-07 19:39
TJoe1-Oct-07 19:39 
GeneralRe: Implying method return type Pin
eggie51-Oct-07 19:51
eggie51-Oct-07 19:51 
AnswerRe: Implying method return type Pin
Pete O'Hanlon1-Oct-07 22:58
mvePete O'Hanlon1-Oct-07 22:58 
GeneralRe: Implying method return type Pin
eggie52-Oct-07 7:04
eggie52-Oct-07 7:04 
GeneralRe: Implying method return type Pin
Pete O'Hanlon2-Oct-07 9:51
mvePete O'Hanlon2-Oct-07 9:51 
QuestionCrysta report help Pin
bttds1-Oct-07 17:19
bttds1-Oct-07 17:19 
QuestionSNMP Help required Pin
Muhammad Nauman Yousuf1-Oct-07 15:38
Muhammad Nauman Yousuf1-Oct-07 15:38 
Questionprocess wont start.... Pin
kb1ibh1-Oct-07 14:26
kb1ibh1-Oct-07 14:26 
AnswerRe: process wont start.... Pin
PIEBALDconsult1-Oct-07 14:29
mvePIEBALDconsult1-Oct-07 14:29 
GeneralRe: process wont start.... Pin
kb1ibh1-Oct-07 14:33
kb1ibh1-Oct-07 14:33 
GeneralRe: process wont start.... Pin
PIEBALDconsult1-Oct-07 14:43
mvePIEBALDconsult1-Oct-07 14:43 
QuestionMore if's? Pin
MasterSharp1-Oct-07 14:08
MasterSharp1-Oct-07 14:08 
AnswerRe: More if's? Pin
PIEBALDconsult1-Oct-07 14:19
mvePIEBALDconsult1-Oct-07 14:19 
AnswerRe: More if's? Pin
Christian Graus1-Oct-07 14:19
protectorChristian Graus1-Oct-07 14:19 
AnswerRe: More if's? Pin
Matthew Cuba1-Oct-07 16:19
Matthew Cuba1-Oct-07 16:19 
GeneralRe: More if's? Pin
MasterSharp1-Oct-07 14:27
MasterSharp1-Oct-07 14:27 

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.