pedram

pedram

  • NA
  • 13
  • 12.5k

How can I throw a new NotImlementedException

Apr 23 2013 6:23 AM
I was wondering if you could tell me how I can throw a new exception when a part of my code is not implemented,
have a look at my code:    
        public void BuildHTML(string htmlfilenaddress, string htmlstring)
        {
            try
            {
                    using (FileStream fs = new FileStream(htmlfilenaddress, FileMode.Create))
                    {
                        using (StreamWriter writer = new StreamWriter(fs, Encoding.UTF8))
                        {
                            writer.Write(htmlstringbegin + htmlstring + htmlstringend);
                        }
                    }
            }
 
            catch (NotImplementedException)
            {
                throw new NotImplementedException();
            }
        }

I want the exception to be caught when the writer writes null value.
Thank you.

Answers (1)