Subtext.Framework.BlogInfo.GetHashCode C# (CSharp) Méthode

GetHashCode() public méthode

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

Usage Example

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

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