c# object instantiation
- by user1112111
What's the difference between:
Object o = new Object();
o.foo();
and
new Object().foo();
(assuming I do not need the reference afterwards) ?
Are there any reasons for using one instead of the other one (e.g. memory usage) ?