Spread Windows Forms 6.0 Product Documentation
Equals Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > NamedStyle Class : Equals Method


o
Object to compare

Glossary Item Box

Determines whether another object is a reference to this object.

Syntax

Visual Basic (Declaration) 
Public Overrides Function Equals( _
   ByVal o As Object _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As NamedStyle
Dim o As Object
Dim value As Boolean
 
value = instance.Equals(o)
C# 
public override bool Equals( 
   object o
)

Parameters

o
Object to compare

Return Value

Boolean: true if the styles are equivalent; false otherwise

Example

This example queries whether the NamedStyle object is equal to the StyleInfo object.
C#Copy Code
bool b;
FarPoint.Win.Spread.StyleInfo si = new FarPoint.Win.Spread.StyleInfo();
si.BackColor = Color.Yellow;
si.Font = new Font("Comic Sans Serif", 12);
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle();
si.BackColor = Color.Yellow;
ns.CopyFrom(si);
fpSpread1.NamedStyles.Add(ns);
fpSpread1.ActiveSheet.ColumnHeader.DefaultStyle = ns;
fpSpread1.ActiveSheet.RowHeader.DefaultStyle = ns;
b = ns.Equals(si);
listBox1.Items.Add(b.ToString());
Visual BasicCopy Code
Dim b As Boolean
Dim si As New FarPoint.Win.Spread.StyleInfo()
si.BackColor = Color.Yellow
si.Font = New Font("Comic Sans Serif", 12)
Dim ns As New FarPoint.Win.Spread.NamedStyle("StyleHeaders", "HeaderDefault")
ns.CopyFrom(si)
FpSpread1.NamedStyles.Add(ns)
FpSpread1.ActiveSheet.ColumnHeader.DefaultStyle = ns
FpSpread1.ActiveSheet.RowHeader.DefaultStyle = ns
b = ns.Equals(si)
ListBox1.Items.Add(b.ToString())

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.