simple question about ref with object?? PLEASE HELP

Tech-Archive recommends: Fix windows errors by optimizing your registry



ok i have a datagridview in my app and i have a function defined like
so:
public void FillColumns(ref DataGridView theDGV)


when i call it ... like this :
FillColumns(ref dataGridView2);

i get : Object reference not set to an instance of an object.

i dont get it , is'nt my datagridview defined in form.designer.cs????
-> private System.Windows.Forms.DataGridView dataGridView2;

PLEASE HELP ME OUT.. i need this in a hurry!

Thanks
Gideon

.



Relevant Pages

  • LINQtoSQL error??
    ... I'm getting an error "Object reference not set to an instance of an object." ... with line number shown as <### as i try to popuate a DataGridView: ... This model appears identical to many examples I've seen so what am I missing? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: simple question about ref with object?? PLEASE HELP
    ... A DataGridView is a reference type. ... Never trust a dunderhead with a blunderbuss. ... Object reference not set to an instance of an object. ...
    (microsoft.public.dotnet.languages.csharp)