DataSet HasTables Method
DataSet Extentions.
Add Methods to Objects.
So, it's getting me tired to always right:
if (ds != null && ds.Tables.Count > 0)
to make sure that a certain dataset really has tables inside.
So here is an extension I added to the DataSet object:
Simple, yet efficient :)
Elad Shalom,
CTO at ITweetLive.com
Add Methods to Objects.
So, it's getting me tired to always right:
if (ds != null && ds.Tables.Count > 0)
to make sure that a certain dataset really has tables inside.
So here is an extension I added to the DataSet object:
public static bool HasTables(this DataSet ds) { if (ds != null && ds.Tables.Count > 0) return true; return false; }
Simple, yet efficient :)
Elad Shalom,
CTO at ITweetLive.com
Comments
Post a Comment