Answers for "using vs try"

0

using vs try

{
  Font font1 = new Font("Arial", 10.0f);
  try
  {
    byte charset = font1.GdiCharSet;
  }
  finally
  {
    if (font1 != null)
      ((IDisposable)font1).Dispose();
  }
}
Posted by: Guest on October-25-2020

Browse Popular Code Answers by Language