还原一些readyonly项

This commit is contained in:
sin365 2024-12-23 01:16:23 +08:00
parent f705b947c3
commit e5e7beb52c
2 changed files with 13 additions and 7 deletions

View File

@ -6,7 +6,10 @@ public struct MsgBool
public string ErrorMsg;
public bool Value;
public override string ToString()
//low C# readonly
//public override readonly string ToString()
public override string ToString()
{
if (Value)
{
@ -33,12 +36,13 @@ public struct MsgBool
return msgBool.Value;
}
//public static implicit operator (bool, string)(MsgBool msgBool)
//{
// return (msgBool.Value, msgBool.ErrorMsg);
//}
//low C#
//public static implicit operator (bool, string)(MsgBool msgBool)
//{
// return (msgBool.Value, msgBool.ErrorMsg);
//}
public static implicit operator string(MsgBool msgBool)
public static implicit operator string(MsgBool msgBool)
{
return msgBool.ToString();
}

View File

@ -137,8 +137,10 @@ namespace AxibugEmuOnline.Client
m_keyListener = Controller.GetKey(m_hostController.ControllerIndex, m_buttonType);
}
}
//low C# readonly
//public readonly struct KeyListener
public struct KeyListener
public struct KeyListener
{
private readonly KeyCode m_key;