.NET
iddotnet.txt
Associated article: Identity and Equality in .NET
Tags: .NET
Published source code and related files accompanying the article Matthew Wilson in which he examines C#'s "as" operator which tests an object instance against a type, and returns a reference to the given type. Also see IDDOTNET.ZIP.
Identity and Equality in .NET
by Matthew Wilson
Listing One
class SomeType
{
private string m_string;
private int m_int;
public override bool Equals(Object obj)
{
// Check against null
if(obj == null)
{
return false;
}
else
{
// Check against different type
if(...


