Click here to Skip to main content
15,848,319 members
Home / Discussions / C#
   

C#

 
GeneralRe: What's The Best Way To Do This? Pin
Kevin Marois1-Nov-17 6:43
professionalKevin Marois1-Nov-17 6:43 
GeneralRe: What's The Best Way To Do This? Pin
Pete O'Hanlon1-Nov-17 6:59
subeditorPete O'Hanlon1-Nov-17 6:59 
AnswerRe: What's The Best Way To Do This? Pin
Nathan Minier1-Nov-17 2:36
professionalNathan Minier1-Nov-17 2:36 
SuggestionRe: What's The Best Way To Do This? Pin
Sascha Lefèvre1-Nov-17 3:01
professionalSascha Lefèvre1-Nov-17 3:01 
GeneralRe: What's The Best Way To Do This? Pin
Nathan Minier1-Nov-17 3:34
professionalNathan Minier1-Nov-17 3:34 
QuestionRe: What's The Best Way To Do This? Pin
Eddy Vluggen1-Nov-17 11:19
professionalEddy Vluggen1-Nov-17 11:19 
AnswerRe: What's The Best Way To Do This? Pin
Wendelius1-Nov-17 11:51
mentorWendelius1-Nov-17 11:51 
QuestionNext generics Problem Pin
Kevin Marois31-Oct-17 7:03
professionalKevin Marois31-Oct-17 7:03 
See my previous post

Now in the base class I want to add a method that return all Data Types that match the generic type:
// Get back all Data Types that match the generic type
public List<DataType<T>> GetTypes(T typeToGet)
{
    return DataTypes.Where(x => x.ConvestionType == typeToGet).ToList();
}
but this fails to compile on the "x.ConvestionType == typeToGet".

The error is "Operator '==' cannot be applied to operands of type 'T' and 'T'".

Not sure why this doesn't work. The 'typeToGet' param is of the same type as the class. What's wrong here?

Thanks!
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: Next generics Problem Pin
harold aptroot31-Oct-17 7:11
harold aptroot31-Oct-17 7:11 
GeneralRe: Next generics Problem Pin
Kevin Marois31-Oct-17 7:25
professionalKevin Marois31-Oct-17 7:25 
QuestionHow To Make This Generic Pin
Kevin Marois31-Oct-17 6:02
professionalKevin Marois31-Oct-17 6:02 
AnswerRe: How To Make This Generic Pin
Sascha Lefèvre31-Oct-17 6:43
professionalSascha Lefèvre31-Oct-17 6:43 
GeneralRe: How To Make This Generic Pin
Kevin Marois31-Oct-17 6:55
professionalKevin Marois31-Oct-17 6:55 
QuestionWPF assembly in C# Pin
Benjamin Bruno30-Oct-17 20:36
Benjamin Bruno30-Oct-17 20:36 
AnswerRe: WPF assembly in C# Pin
Mycroft Holmes30-Oct-17 21:30
professionalMycroft Holmes30-Oct-17 21:30 
AnswerRe: WPF assembly in C# Pin
Pete O'Hanlon30-Oct-17 21:31
subeditorPete O'Hanlon30-Oct-17 21:31 
AnswerRe: WPF assembly in C# Pin
OriginalGriff30-Oct-17 21:37
mveOriginalGriff30-Oct-17 21:37 
AnswerRe: WPF assembly in C# Pin
Gerry Schmitz31-Oct-17 13:17
mveGerry Schmitz31-Oct-17 13:17 
GeneralRe: WPF assembly in C# Pin
peterkm2-Nov-17 7:29
professionalpeterkm2-Nov-17 7:29 
QuestionEnum of C# Data Types - byte[] and char[] Pin
Kevin Marois30-Oct-17 13:30
professionalKevin Marois30-Oct-17 13:30 
GeneralRe: Enum of C# Data Types - byte[] and char[] Pin
Sascha Lefèvre30-Oct-17 15:06
professionalSascha Lefèvre30-Oct-17 15:06 
GeneralRe: Enum of C# Data Types - byte[] and char[] Pin
Kevin Marois31-Oct-17 5:56
professionalKevin Marois31-Oct-17 5:56 
GeneralRe: Enum of C# Data Types - byte[] and char[] Pin
Sascha Lefèvre31-Oct-17 6:20
professionalSascha Lefèvre31-Oct-17 6:20 
QuestionConvert an obsolete old REST documentation Pin
Member 1096750730-Oct-17 1:54
Member 1096750730-Oct-17 1:54 
QuestionHow calculate Checksum for barcode code128 auto? Pin
Le@rner29-Oct-17 21:01
Le@rner29-Oct-17 21:01 

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.