why 'ref' keyword flitting an object?
if i am flitting an vigilant method, since should i ref keyword? isn't default intrepidity anyway?
for example:
class program
{
stationary vacant main(string[] args)
{
testref t = new testref();
t.something = "foo";
dosomething(t);
console.writeline(t.something);
}
stationary open vacant dosomething(testref t)
{
t.something = "bar";
}
}
public category testref
{
open twine something { get; set; }
}
the cost "bar" means vigilant upheld reference.
Comments
Post a Comment