Saturday, July 6, 2013

Implementing Java's "Exceptions Thrown by a Method" in C#

I have been working on a conversion project for last few days where I need to convert a Java library to C#. At one point I came to java's certain feature called . Here is a little glimpse of it:

public boolean isRequest() throws NullPointerException
{
// blocks of code implementing isRequest() method;
}


For the C# implementation of this code snippet, I searched the web and quite shockingly found that, C# does not support throwing exceptions in the compile time.

Now my question is, how can I implement this code portion in a C# library? - Full Post

No comments:

Post a Comment