Fórmulas e Cenas

Object Reference Not Set to Instance of an Object

  Home  |   Contact  |   Syndication    |   Login
  39 Posts | 0 Stories | 6 Comments | 0 Trackbacks

News

Archives

Post Categories

Links

Monday, December 14, 2009 #

In this category I will post some "creative" solutions to problems. (Code changed to protect the inocents).

 

// The WTF way

int  myInt = Int32.Parse(myDataTable.Rows.Count + "");

// The correct way

int  myInt = myDataTable.Rows.Count;

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati