C# var icon = System.Drawing.Icon.ExtractAssociatedIcon(@"filepath"); var m = new MemoryStream(); icon.Save(m); var bitmapiamge = new BitmapImage(); bitmapiamge.BeginInit(); bitmapiamge.StreamSource = m; bitmapiamge.EndInit(); this.Icon = bitmap…
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication6 { public class Program { public static void Main(string[] args) { string fileName = @"D…