Horje
how to check if file contains image c# Code Example
how to check if file contains image c#
public static readonly List<string> ImageExtensions = new List<string> { ".JPG", ".JPE", ".BMP", ".GIF", ".PNG" };

private void button_Click(object sender, RoutedEventArgs e)
{
    var folder = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
    var files = Directory.GetFiles(folder);
    foreach(var f in files)
    {
        if (ImageExtensions.Contains(Path.GetExtension(f).ToUpperInvariant()))
        {
            // process imagek
        }
    }
}




Csharp

Related
if file exist rename c# Code Example if file exist rename c# Code Example
c# string split by length Code Example c# string split by length Code Example
c# findindex Code Example c# findindex Code Example
solidity get address of contract Code Example solidity get address of contract Code Example
implement custom string to datetime convert net core Code Example implement custom string to datetime convert net core Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10