📄 valuenamedesc!1.cs
字号:
namespace Imps.Client.Pc
{
using System;
public class ValueNameDesc<T>
{
private string _desc;
private string _name;
private T _val;
public ValueNameDesc(T value, string name)
{
this._val = value;
this._name = name;
}
public ValueNameDesc(T value, string name, string desc)
{
this._val = value;
this._name = name;
this._desc = desc;
}
public bool Equals(ValueNameDesc<T> item)
{
if ((item != null) && (object.Equals(this._val, item._val) && object.Equals(this._name, item._name)))
{
return object.Equals(this._desc, item._desc);
}
return false;
}
public override bool Equals(object obj)
{
if (obj is ValueNameDesc<T>)
{
return this.Equals((ValueNameDesc<T>) obj);
}
return false;
}
public override int GetHashCode()
{
int num = this._val.GetHashCode() & this._name.GetHashCode();
if (this._desc != null)
{
num &= this._desc.GetHashCode();
}
return num;
}
public override string ToString()
{
return this.Description;
}
public string Description
{
get
{
if (!string.IsNullOrEmpty(this._desc))
{
return this._desc;
}
return this._name;
}
set
{
this._desc = value;
}
}
public string Name
{
get
{
return this._name;
}
set
{
this._name = value;
}
}
public T Value
{
get
{
return this._val;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -