mirror of
https://github.com/jwetzell/QControlKit.git
synced 2026-08-13 19:33:44 +00:00
Initial Commit
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace SharpOSC
|
||||
{
|
||||
public class Symbol
|
||||
{
|
||||
public string Value;
|
||||
|
||||
public Symbol()
|
||||
{
|
||||
Value = "";
|
||||
}
|
||||
|
||||
public Symbol(string value)
|
||||
{
|
||||
this.Value = value;
|
||||
}
|
||||
|
||||
override
|
||||
public string ToString()
|
||||
{
|
||||
return Value;
|
||||
}
|
||||
|
||||
public override bool Equals(System.Object obj)
|
||||
{
|
||||
if (obj.GetType() == typeof(Symbol))
|
||||
{
|
||||
if (this.Value == ((Symbol)obj).Value)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else if (obj.GetType() == typeof(string))
|
||||
{
|
||||
if (this.Value == ((string)obj))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool operator ==(Symbol a, Symbol b)
|
||||
{
|
||||
if (a.Equals(b))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool operator !=(Symbol a, Symbol b)
|
||||
{
|
||||
if (!a.Equals(b))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Value.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user