Welcome to DetlefGrohs.com Sign in | Join | Help

Wednesday, March 04, 2009 - Posts

Web Service Proxy Using and Exception Handling Pattern

Here is the pattern that I currently use for Web Service proxy requests that handles the cleaning up of server and client resources properly. 1: using (WSProxyClient proxy = new WSProxyClient()) 2: { 3: try 4: { // Call the service
posted by detlef | 0 Comments
Filed Under:

Using Explorations

I noted some odd behavior with the use of the ‘using’ keyword in C#. Using the following class that implements IDisposable: 1: namespace UsingExplorations 2: { 3: using System; 4: public class DisposableClass : IDisposable 5: { 6:
posted by detlef | 0 Comments
Filed Under:

Null Coalescing Operator

I really like the Null Coalescing Operator (??) especially when coupled with the ‘as’ keyword that allows for statements such as: 1: string string_value = (data_row["StringColumn"] as string) ?? string.Empty; 2: double double_value = (data_row["DoubleColumn"]
posted by detlef | 0 Comments