Help with understanding C# code and porting to Objective-C

后端 未结 7 1364
心在旅途
心在旅途 2021-01-20 15:35

Ok, I have this prototype that was written by someone else in C# and I\'m trying to put it into Objective-C. Now, I haven\'t had any formal experience with C# yet, so I don\

7条回答
  •  一向
    一向 (楼主)
    2021-01-20 16:00

    The first c_data is a default no-args constructor which initialises the structure's fields to default values (value -> 0.0, label -> 0, ID -> 0) and the second c_data is a constructor which sets the value field of the instance to the passed-in parameter val and the other fields to their default values. What I've described is how those two constructor calls initialise the instance.

提交回复
热议问题