Spread for ASP.NET 11 Product Documentation
GetHashCode Method (NamedStyle)
Example 


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > NamedStyle Class : GetHashCode Method
Gets the hash code of this object.
Syntax
'Declaration
 
Public Overrides Function GetHashCode() As Integer
'Usage
 
Dim instance As NamedStyle
Dim value As Integer
 
value = instance.GetHashCode()
public override int GetHashCode()

Return Value

Integer hash code
Remarks
For more information about the GetHashCode method and hash codes, refer to Object.GetHashCode method in the Microsoft .NET Framework Reference.
Example
This example illustrates the use of this member by returning the hash code of the NamedStyle object.
FarPoint.Web.Spread.NamedStyle ns = new FarPoint.Web.Spread.NamedStyle();
FarPoint.Web.Spread.StyleInfo si = new FarPoint.Web.Spread.StyleInfo();
int i;
si.BackColor = Color.LightBlue;
ns.CopyFrom(si);
i = ns.GetHashCode();
listBox1.Items.Add(i.ToString());
fpSpread1.ActiveSheetView.DefaultStyle = ns;
Dim ns As New FarPoint.Web.Spread.NamedStyle()
Dim si As New FarPoint.Web.Spread.StyleInfo()
si.BackColor = Color.LightBlue
ns.CopyFrom(si)
FpSpread1.ActiveSheetView.DefaultStyle = ns
Dim b As Boolean
Dim doc As New System.Xml.XmlDocument()
Dim node As System.Xml.XmlNode
Dim r As System.Xml.XmlNodeReader
doc.Load("..\files\mystyle.xml")
node = doc.FirstChild
While Not (node.Name.Equals("Style"))
 node = node.NextSibling
End While
r = New System.Xml.XmlNodeReader(node)
r.Read()
b = ns.Deserialize(r)
ListBox1.Items.Add(b)
See Also

Reference

NamedStyle Class
NamedStyle Members