Pilot

Pilot.cs
01/* Copyright (C) 2004 - 2007 db4objects Inc. http://www.db4o.com */ 02namespace Db4objects.Db4odoc.ClassMapping 03{ 04 public class Pilot 05 { 06 string _name; 07 int _points; 08 09 public Pilot(string name, int points) 10 { 11 _name = name; 12 _points = points; 13 } 14 15 public int Points 16 { 17 get 18 { 19 return _points; 20 } 21 } 22 23 public void AddPoints(int points) 24 { 25 _points += points; 26 } 27 28 public string Name 29 { 30 get 31 { 32 return _name; 33 } 34 } 35 36 override public string ToString() 37 { 38 return string.Format("{0}/{1}", _name, _points); 39 } 40 } 41}
Pilot.vb
01' Copyright (C) 2007 db4objects Inc. http://www.db4o.com 02Namespace Db4objects.Db4odoc.ClassMapping 03 Public Class Pilot 04 Private _name As String 05 06 Private _points As Integer 07 08 Public Sub New(ByVal name As String, ByVal points As Integer) 09 _name = name 10 _points = points 11 End Sub 12 13 Public ReadOnly Property Points() As Integer 14 Get 15 Return _points 16 End Get 17 End Property 18 19 Public Sub AddPoints(ByVal points As Integer) 20 _points += points 21 End Sub 22 23 Public ReadOnly Property Name() As String 24 Get 25 Return _name 26 End Get 27 End Property 28 29 Public Overloads Overrides Function ToString() As String 30 Return String.Format("{0}/{1}", _name, _points) 31 End Function 32 33 End Class 34End Namespace