Re: Inheritance of constructors.

Tech-Archive recommends: Speed Up your PC by fixing your registry



On Jun 30, 1:43 pm, A n g l e r <p|k|o|n|i|u|...@xxxxxxxxxxxxxxxxxxx>
wrote:
Basically you can't write any actual code in the constructor before
the base constructor call. You *can* make a static method call, so you
can do:

Brilliant, I thought so. Blooming drawbacks of the garbage collector and
the whole automated memory management by ms, right? :/

Well, it's more that doing things within an object before it's been
initialized in the parent is somewhat questionable.

<snip>

That won't help you for a ref parameter, however. Are you sure you
need a ref parameter in the constructor call? That's pretty unusual.

No, I guess I don't cos I pass just an array of objects which anyway
means (I guess so) it's handled in a similar way to reference. Isn't it?

DataGridView[] arr = new DataGridView[] { grid1, grid2, grid3 };

There's a big difference between "pass by reference" and "pass
reference by value". It confuses quite a lot of people, and it's well
worth being aware of the difference. It's mostly down to confusingly
named terminology, IMO.

See http://pobox.com/~skeet/csharp/parameters.html

Jon
.



Relevant Pages

  • Need Help with Index and Match or Vlookup
    ... Sorry about this but this one still confuses me. ... Can someone help me with index and match or vlookup? ... VLOOKUP(G1569,'AUGUST 15 PAYMENT DETAIL'!$C$4:$I$1021,1,FALSE) ... I need the formula to also get the data even if the the reference is ...
    (microsoft.public.excel.worksheet.functions)
  • Re: What computer language is used a lot in the IT industry?
    ... I know - the irrelevance of the reference itself is exactly what I've ... To say 'Java passes by value' is to impoverish our ability ... >> the point of view of the language), ... >> distinction to a position where it merely confuses the issue. ...
    (comp.programming)
  • Re: Declare Sub XXX Lib "X.dll" (Structure vs Class) ...
    ... I assume that the Class stores some additional data that confuses ... the interface to teh X.dll? ... the reference to the passed value is passed. ...
    (microsoft.public.dotnet.languages.vb)
  • RE: SSI Include Error
    ... As it turns out SSI's were working but for that specific page I had to change the reference. ... Instead of referencing the filder with an absolute path such as: ... Why this has changed really confuses me because the reference I had before was working fine. ...
    (microsoft.public.inetserver.iis)