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 Exceptions Thrown by a Method. 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?