C#属性简写的原理分析之get set private

陌生的奇怪的属性用法,特地记录一下,如下:
public bool Skidding { get; private set; }        

public float BrakeInput { get; private set; }  

     public float CurrentSteerAngle{ get { return m_SteerAngle; }}        

public float CurrentSpeed{ get { return m_Rigidbody.velocity.magnitude*2.23693629f; }}    

   public float MaxSpeed{get { return m_Topspeed; }}  

     public float Revs { get; private set; }    

   public float AccelInput { get; private set; }

以上相关链接:https://blog.csdn.net/narutojzm1/article/details/50783109

 

最终原文链接:https://www.cnblogs.com/KeithWang/archive/2011/12/22/2297766.html

你可能感兴趣的:(基本知识,C#)