-
Notifications
You must be signed in to change notification settings - Fork 0
Property declaration
irxground edited this page Sep 9, 2013
·
1 revision
public class User {
private string _Name;
public string Name {
get { return _Name; }
protected set { _Name = value; }
}
}
class User {
private var _name: String = _
def name = _name
protected def name_= (value: String) {
_name = value
}
}
type User() =
let mutable name = ""
member this.Name = name
member private this.Name
with set (value) = name <- value
class User
def name
@name
end
protected
def name=(value)
@name = value
end
end
class PropertyTest1(object):
def __init__(self):
self._x = None
def get_x(self):
return self._x
def set_x(self, value):
self._x = value
x = property(get_x, set_x)