What does it mean??

  • Thread starter Thread starter Przemek F±fara
  • Start date Start date
P

Przemek F±fara

DataTableCollection dta = myDataSet.Tables;

DataRowCollection dra = myDataSet.Tables["Plyty"].Rows;

DataRow dr = dra[0];

textTytul.Text = dr[0].ToString; !!!!!!!!!!!!!! ( ERROR : Method
'int.ToString(string)' referenced without parentheses )

What shuld I do?? What is wrong...
 
Sorry ... this is the good question :)

DataTableCollection dta = myDataSet.Tables;

DataRowCollection dra = myDataSet.Tables["Plyty"].Rows;

DataRow dr = dra[0];

textTytul.Text = dr[0].ToString; ( ERROR : Method 'object.ToString()'
referenced without parentheses )



What shuld I do ??
 
textTytul.Text = dr[0].ToString();

ToString is a method, not a property, so you need to provide parentheses
(brackets). unlike VB, C-syntax languages require this.

Leon
 
Przemek,

ToString is a method, so you have to access it like this:

textTytul.Text = dr[0].ToString();

Hope this helps.
 
Przemek F±fara said:
DataTableCollection dta = myDataSet.Tables;

DataRowCollection dra = myDataSet.Tables["Plyty"].Rows;

DataRow dr = dra[0];

textTytul.Text = dr[0].ToString; !!!!!!!!!!!!!! ( ERROR : Method
'int.ToString(string)' referenced without parentheses )

What shuld I do?? What is wrong...

You should put the parentheses in, as the error message suggests.

textTytul.Text = dr[0].ToString();
 
Back
Top