Created
July 26, 2016 21:48
-
-
Save Fhernd/fa42f376a6f39801ccdd5d6efc849931 to your computer and use it in GitHub Desktop.
Demostración uso de la interfaz IEquatable<T>. [OrtizOL]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GenericoPersonalizado<T> where T : IEquatable<T> | |
{ | |
public bool EsIgual(T a, T b) | |
{ | |
// Sin uso de boxing sobre el tipo genérico T: | |
return a.Equals(b); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment