Exemplo n.º 1
0
 /// <summary>
 /// Gets an instance of an Image.
 /// </summary>
 /// <param name="image">an Image</param>
 /// <returns>an object of type Gif, Jpeg or Png</returns>
 public static Image getInstance(Image image)
 {
     try {
         return((Image)image.GetType().GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic, null, new Type[] { typeof(Image) }, null).Invoke(new object[] { image }));
     }
     catch (Exception e) {
         throw e;
     }
 }