`` `` `` `` `` `` ``
" />
public int MaxHealth => Memory[Address].IsValid ? Memory[Address].Read<int>(Offs.Life.MaxHp) : 0;
If <真> is true, return
Memory[Address].IsValid
Memory[Address].Read<int>(Offs.Life.MaxHp)
Memory[Address].IsValid
This code shows a field, which is determined by the three yuan condition operators. The operator is evaluated only when type instantiation.
<表> Other Member of the main expression
public int MaxHealth = x ? y : z;
Index <>
Method <方法> The operator <<> Construction function (added in C# 7.0)
Terminal (added in C# 7.0)
The above is the detailed content of What Does the `=>` Operator Do in C# Properties and Methods?. For more information, please follow other related articles on the PHP Chinese website!