How do I find out the type of a typed class to compare it with an object?
This is my code:
public static Salon<T> operator +(Salon<T> salon, T per)
{
if (salon.Equals(per))
throw new NoAgregaException("El elemento es del tipo " + per.GetType() + " y se esperaba " + salon.GetType());
if (salon._elementos.Count < salon._capacidad)
throw new NoAgregaException("asdfadsf");
else
salon._elementos.Add(per);
return salon;
}