Spread ASP.NET 6.0 Product Documentation
Equals Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > StyleInfo Class : Equals Method


o
Object with which to compare the current StyleInfo object

Glossary Item Box

Determines whether the style settings of this object are equivalent to the object specified.

Syntax

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

Parameters

o
Object with which to compare the current StyleInfo object

Return Value

true if the specified object is equivalent to this StyleInfo object; false otherwise

Remarks

Two StyleInfo objects are considered equivalent if all of their properties are equal.

Example

This example creates two StyleInfo objects and the second instance is copied from the first. The second instance is then assigned to the active sheet. Whether the two objects are equal is returned to a list box.
C#Copy Code
 FarPoint.Web.Spread.StyleInfo info = new FarPoint.Web.Spread.StyleInfo();
 FarPoint.Web.Spread.StyleInfo cinfo = new FarPoint.Web.Spread.StyleInfo();
 FarPoint.Web.Spread.Border bord = new FarPoint.Web.Spread.Border(BorderStyle.Double, Color.Red, 3);
 FarPoint.Web.Spread.Border bord1 = new FarPoint.Web.Spread.Border(BorderStyle.Dotted, Color.Yellow, 3);
 info.Border = bord;
 info.CellType = new FarPoint.Web.Spread.LabelCellType();
 cinfo.Border = bord1;
 cinfo.CellType = new FarPoint.Web.Spread.ButtonCellType();
 cinfo.CopyFrom(info);
 FpSpread1.ActiveSheetView.SetStyleInfo(0, 0, cinfo);
 bool bl;
 bl = cinfo.Equals(info);
 ListBox1.Items.Add(Convert.ToString(bl)); 
Visual BasicCopy Code
 Dim info As New FarPoint.Web.Spread.StyleInfo()
 Dim cinfo As New FarPoint.Web.Spread.StyleInfo()
 Dim bord As New FarPoint.Web.Spread.Border(BorderStyle.Double, Color.Red, 3)
 Dim bord1 As New FarPoint.Web.Spread.Border(BorderStyle.Dotted, Color.Yellow, 3)
 info.Border = bord
 info.CellType = New FarPoint.Web.Spread.LabelCellType()
 cinfo.Border = bord1
 cinfo.CellType = New FarPoint.Web.Spread.ButtonCellType()
 cinfo.CopyFrom(info)
 FpSpread1.ActiveSheetView.SetStyleInfo(0, 0, cinfo)
 Dim bl As Boolean
 bl = cinfo.Equals(info)
 ListBox1.Items.Add(bl)  

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.