title: Map C# class into Objective-C one?
body: <p>Im a C# developer whom is new to Objective C and this migration has not been easy due to the difference between the two languages.</p>
  
  <p>What im try do is to create a class that has properties similar to as you do in C#.
  If for ex have a C# class which looks like:</p>
  
  <pre><code>public class X
  {
    private int _d, _y;
  
    public int D { get {return _d; } set{ _d= value;}}
    public int Y { get{ return _y;} set {_y = value;}}
  }
  </code></pre>
  
  <p>Who does one write this in objective C?</p>
  
  <p>I have tried but been unable to do this.
  My objective C class for the moment looks like this:</p>
  
  <pre><code>@interface X : NSObject
  {
     @private
       int _d ,_y;
  }
  
  @property (nonatomic, readwrite, retain) int d;
  @property (nonatomic, readwrite, retain) int y;
  
  @end
  
  @implementation X
  
  @synthesize d = _d;
  @synthesize y = _y;
  
  -(void)dealloc
  {
    [d release];
    [y release];
    [super dealloc];
  }
  
  @end
  </code></pre>
  
  <p>Thank you in advance.</p>