KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
void Get<T>(Action<T> createObject) { T obj = createObject(); if(obj == default(T)) return obj; // .. do a bunch of stuff return obj; } Compiler error: Operator '==' cannot be applied to operands of type 'T' and 'T' How do I do this properly?
Tags (comma-separated)
Save Edits
Cancel