J
Jon Shemitz
How come I can write code like "if (L)" but NOT code like "if (L ==
true)" when L is a class with an implicit operator bool?
///////////
List L = new List();
public class List
{
private long count = 0;
public static implicit operator bool (List L)
{
return L.count > 0;
}
}
true)" when L is a class with an implicit operator bool?
///////////
List L = new List();
public class List
{
private long count = 0;
public static implicit operator bool (List L)
{
return L.count > 0;
}
}