Subtext.Framework.BlogInfo.GetHashCode C# (CSharp) Method

GetHashCode() public method

Serves as the hash function for the type BlogInfo, suitable for use in hashing functions.
public GetHashCode ( ) : int
return int
        public override int GetHashCode()
        {
            return this.Host.GetHashCode() ^ this.Subfolder.GetHashCode();
        }

Usage Example

Example #1
0
        public void CanGetHashCode()
        {
            BlogInfo blog = new BlogInfo();
            blog.Host = "http://subtextproject.com";
            blog.Subfolder = "blog";

            Assert.AreEqual(-1988688221, blog.GetHashCode());
        }