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

March 2010 Entries

Well... I cant really express my feelings for this kind of programming... The WTF way: DateTime myNewDate = DateTime.Parse((myOldDate.Year - 1).ToString() + "-" + myOldDate.Month.ToString() + "-" + myOldDate.Day.ToString()); The right way: DateTime myNewDate = myOldDate.Date.AddYears(-1);
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Well, this one i simply cannot understand... why anyone would do +0 after and int.parse. Any Ideas? int myVar = Int32.Parse(ConfigurationMa... + "") + 0;
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

protected override void OnPreInit(EventArgs e) { Page.MasterPageFile = "~/LinkToMasterPage"; base.OnInit(e); } Enjoy :)
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

DBCC CHECKIDENT (yourtable, reseed, 0) Enjoy :)...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

It's a tricky and annoying situation... To do work around it, execute the following command on command prompt: netsh winsock reset Then Restart Windows enter the next command: netsh int ip reset reset.log Restart Windows and you are ready to go. Enjoy :)
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati