>Is there any way ti check for the type of a file. I mean, I want to check if a file is an Image File or a PDF or XPS file. I have written a Method for the Image:
>
> public static bool IsImageFile(string file)
> {
> bool isImageFile = false;
> if (FileManager.FileExist(file))
> {
> try
> {
> if ((new Bitmap(file)) != null) isImageFile = true;
> }
> catch
> {
> }
> }
>
> return isImageFile;
> }
>
>
>It creates a new Bitmap() so if it is a big image the method should be very slow, and I only want to check it.
You may find something useful in there:
FileFunction:FileType() LXFramework method #40