This article would have you use a wrapper class that serializes more nicely than DataSet, and in fact it really does halve the size of the dataset (in serialized form).
However, the time it takes to serialize a decently sized dataset 100 times to the time it takes to serialize the surrogate 100 times is 6 seconds to 30...
Nonetheless it seems like the overall consensus is that it's good to avoid sending DataSets across remoting and soap.
What are your thoughts and solutions on the matter?
Thanks for your response. I looked at your solution and it may work well enough for files, but in serialization and compression it's really the file type that matters. You created a pseudo-schema, which is almost like a dataset in itself.
I'm just trying to find the quickest way to do it. The problem with the Surrogate that MSDN suggests is the large overhead to get to it.
A simple object (light but a pain to use) outperforms DataSet and DataSurrogate (zipped and unzipped) significantly on a small number of rows, but as the actual size increases, the difference fades.
I want to write my program in .NET 2.0, just because I'm used to it (and because it will be primarily run on XP). However, for a certain part of the screen (i.e. a separate window) I want to use WPF to render text and video etc. Is this possible? What I was thinking was creating a component in WPF, and adding it to my app. Does anyone know of an easy way to do this? Am I just confused, thinking that I cant use .NET 2 controls in a .NET 3 project?
supposed to return a value?
No, SmtpClient is a class, not a method. Perhaps you were thinking of the SmtpClient.Send() method? But it also doesn't return a value. If something goes wrong, it will only throw one of six exceptions, documented here[^].
Anybody know right off the top of their head how
to ping /poll the SMTP server before hitting
You can ping the target server, but there is nothing that says that the target server has to respond to that ping. It's also entirely possible that the target is sitting behind a firewall, blocking ICMP Echo requests, thereby neutering your attempt to "test" the server's presence.
Basically, you can try to ping the server, but it's no guarantee that the server is, or isn't, actually there and responding. The only thing you can do is try to send the message and see what happens.
I have a problem when I use an Add-in to word, I want to get the filename / path of opened document.
(i.e i have a opened a document in word, now when i click my button it should return the filename / filepath of opened word document.
I think it will mostly depend on how the application is written. Keep in mind that WPF is a vector based display technology, but it shouldn't have a problem.
The better option will probably be to rewrite the application to take advantage of WPF and the data binding capabilities rather than to just port it. WPF is a completely new beast and there are better/different ways to do things than we had in WinForms.
In just two days, tomorrow will be yesterday.