' Classes/System/Drawing/CharacterRange.ab

Class CharacterRange
Public
	Sub CharacterRange(f As Long, l As Long)
		first = f
		length = l
	End Sub

	Sub CharacterRange()
		First = 0
		Length = 0
	End Sub

	Function First() As Long
		Return first
	End Function

	Sub First(f As Long)
		first = f
	End Sub

	Function Length() As Long
		Return length
	End Function

	Sub Length(l As Long)
		length = l
	End Sub

	Function Operator ==(c As CharacterRange) As Boolean
		Return Equals(c)
	End Function

	Function Operator <>(c As CharacterRange) As Boolean
		Return Not Equals(c)
	End Function

	Function Equals(c As CharacterRange) As Boolean
		Return first = c.first And length = c.length
	End Function

	Override Function GetHashCode() As Long
		Return first Xor length
	End Function

Private
	first As Long
	length As Long
End Class
