Click here to Skip to main content
15,890,741 members
Home / Discussions / C#
   

C#

 
Generalintercept HTTP Headers in IE Pin
erxud25-Aug-04 9:57
susserxud25-Aug-04 9:57 
GeneralRe: intercept HTTP Headers in IE Pin
Heath Stewart25-Aug-04 10:36
protectorHeath Stewart25-Aug-04 10:36 
GeneralConverting /doc XML file to HTML or help Pin
Joe Woodbury25-Aug-04 9:48
professionalJoe Woodbury25-Aug-04 9:48 
GeneralRe: Converting /doc XML file to HTML or help Pin
Jesse Squire25-Aug-04 9:54
Jesse Squire25-Aug-04 9:54 
GeneralRe: Converting /doc XML file to HTML or help Pin
Nick Parker25-Aug-04 10:08
protectorNick Parker25-Aug-04 10:08 
GeneralRe: Converting /doc XML file to HTML or help Pin
Joe Woodbury25-Aug-04 10:37
professionalJoe Woodbury25-Aug-04 10:37 
GeneralEmpty Dataset Pin
MrJJKoolJ25-Aug-04 8:56
MrJJKoolJ25-Aug-04 8:56 
GeneralRe: Empty Dataset Pin
Heath Stewart25-Aug-04 9:38
protectorHeath Stewart25-Aug-04 9:38 
An empty DataSet isn't null. A DataSet variable is null when it reference nothing. There's a big difference.

If you want to determine if a DataSet is empty, you need to enumerate the tables and get the count of each table. This is the only way to account for both types of DataSets - typed and untyped (generated by a DataAdapter, for example):
public bool IsEmpty(DataSet ds)
{
  if (ds == null) throw new ArgumentNullException("ds");
  foreach (DataTable dt in ds.Tables)
    if (dt.Rows.Count > 0) return false;
  return true;
}
Optionally, if you want to treat a null reference as an empty DataSet (not really a good idea, but it's up to you), then replace the first line with something like if (ds == null) return true;.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles]
GeneralReading Values from multiple ListBoxes and forming an query Pin
abhishk2001@yahoo.com25-Aug-04 8:19
abhishk2001@yahoo.com25-Aug-04 8:19 
GeneralRe: Reading Values from multiple ListBoxes and forming an query Pin
Heath Stewart25-Aug-04 8:29
protectorHeath Stewart25-Aug-04 8:29 
GeneralDateTimePicker Customization Pin
ssTech25-Aug-04 7:37
ssTech25-Aug-04 7:37 
GeneralRe: DateTimePicker Customization Pin
Heath Stewart25-Aug-04 8:55
protectorHeath Stewart25-Aug-04 8:55 
GeneralRe: DateTimePicker Customization Pin
ssTech26-Aug-04 4:57
ssTech26-Aug-04 4:57 
Questionhow to hook up event of winform-based control hosting in IE Pin
EricHu25-Aug-04 7:05
EricHu25-Aug-04 7:05 
AnswerRe: how to hook up event of winform-based control hosting in IE Pin
Nick Parker25-Aug-04 7:20
protectorNick Parker25-Aug-04 7:20 
GeneralRe: how to hook up event of winform-based control hosting in IE Pin
EricHu25-Aug-04 7:51
EricHu25-Aug-04 7:51 
GeneralRe: how to hook up event of winform-based control hosting in IE Pin
Nick Parker25-Aug-04 8:52
protectorNick Parker25-Aug-04 8:52 
GeneralRe: how to hook up event of winform-based control hosting in IE Pin
Heath Stewart25-Aug-04 9:22
protectorHeath Stewart25-Aug-04 9:22 
GeneralRe: how to hook up event of winform-based control hosting in IE Pin
Nick Parker25-Aug-04 10:06
protectorNick Parker25-Aug-04 10:06 
AnswerRe: how to hook up event of winform-based control hosting in IE Pin
Heath Stewart25-Aug-04 9:16
protectorHeath Stewart25-Aug-04 9:16 
GeneralRe: how to hook up event of winform-based control hosting in IE Pin
EricHu25-Aug-04 13:28
EricHu25-Aug-04 13:28 
GeneralRe: how to hook up event of winform-based control hosting in IE Pin
Heath Stewart26-Aug-04 6:50
protectorHeath Stewart26-Aug-04 6:50 
Generalplay a movie Pin
kornstyle25-Aug-04 4:25
kornstyle25-Aug-04 4:25 
GeneralRe: play a movie Pin
Nick Parker25-Aug-04 5:31
protectorNick Parker25-Aug-04 5:31 
GeneralRe: play a movie Pin
kornstyle25-Aug-04 5:56
kornstyle25-Aug-04 5:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.