S
Steven
Which one is faster and why:
dim x as new X
x.Y = 1
system.console.writeline(x.Y)
public class X
private prop_y as integer
public property Y() as integer
get
return prop_y
end get
set(byval value as integer)
prop_Y = value
end set
end property
end class
or this:
dim x as new X
x.setY(1)
system.console.writeline(x.getY)
public class X
private y as integer
public sub setY(byval v as integer)
y=v
end sub
public function getY() as integer
return y
end function
end class
Thanks,
Steven
dim x as new X
x.Y = 1
system.console.writeline(x.Y)
public class X
private prop_y as integer
public property Y() as integer
get
return prop_y
end get
set(byval value as integer)
prop_Y = value
end set
end property
end class
or this:
dim x as new X
x.setY(1)
system.console.writeline(x.getY)
public class X
private y as integer
public sub setY(byval v as integer)
y=v
end sub
public function getY() as integer
return y
end function
end class
Thanks,
Steven