Skip to content

Instantly share code, notes, and snippets.

@ardalis
Created January 21, 2012 00:33
Show Gist options
  • Save ardalis/1650429 to your computer and use it in GitHub Desktop.
Save ardalis/1650429 to your computer and use it in GitHub Desktop.
What the hell?
if (itemExists.Count == 0)
{
int IntCityId = 0, IntStateId = 0, IntCountryId = 0;
if (
int.TryParse(
DataContext.GetCountryID(myDataSet.Tables[0].Rows[i][5].ToString()).ToString(),
out IntCountryId))
{
if (
int.TryParse(
DataContext.GetStateID(myDataSet.Tables[0].Rows[i][4].ToString()).ToString(),
out IntStateId))
{
if (
int.TryParse(
DataContext.GetCityID(myDataSet.Tables[0].Rows[i][3].ToString()).
ToString(), out IntCityId))
{
}
}
}
...
}
@daniel-white
Copy link

what does Get*ID return? int??

@kevinkuebler
Copy link

Wow. Just ... wow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment