Recently I had to automatically resize images, but I ran into problem that some images were rotated. Problem was the EXIF data on some of the images was altering the orientation of the images. As explained here. So here is my method for image resizing:
    public void ResizeImage(string originalFilename, string saveTo,
                     int canvasWidth, int canvasHeight)
    {
      try
      {
        Image image = Image.FromFile(originalFilename);

        Image thumbnail = new Bitmap(canvasWidth, canvasHeight);
        Graphics graphic = Graphics.FromImage(thumbnail);

        graphic.InterpolationMode = InterpolationMode.HighQualityBicubic;
        graphic.SmoothingMode = SmoothingMode.HighQuality;
        graphic.PixelOffsetMode = PixelOffsetMode.HighQuality;
        graphic.CompositingQuality = CompositingQuality.HighQuality;

        int originalWidth = image.Width;
        int originalHeight = image.Height;

        double ratioX = canvasWidth / (double)originalWidth;
        double ratioY = canvasHeight / (double)originalHeight;

        double ratio = ratioX < ratioY ? ratioX : ratioY;

        int newHeight = Convert.ToInt32(originalHeight * ratio);
        int newWidth = Convert.ToInt32(originalWidth * ratio);

        int posX = Convert.ToInt32((canvasWidth - (originalWidth * ratio)) / 2);
        int posY = Convert.ToInt32((canvasHeight - (originalHeight * ratio)) / 2);

        graphic.Clear(Color.White); // white padding

        graphic.DrawImage(image, posX, posY, newWidth, newHeight);

        ImageCodecInfo[] info = ImageCodecInfo.GetImageEncoders();
        EncoderParameters encoderParameters;
        encoderParameters = new EncoderParameters(1);
        encoderParameters.Param[0] = new EncoderParameter(Encoder.Quality,
                         100L);

        int OrientationKey = 0x0112;
        const int NotSpecified = 0;
        const int NormalOrientation = 1;
        const int MirrorHorizontal = 2;
        const int UpsideDown = 3;
        const int MirrorVertical = 4;
        const int MirrorHorizontalAndRotateRight = 5;
        const int RotateLeft = 6;
        const int MirorHorizontalAndRotateLeft = 7;
        const int RotateRight = 8;

        if (image.PropertyIdList.Contains(OrientationKey))
        {
          if (image.PropertyIdList.Contains(OrientationKey))
          {
            var orientation = (int)image.GetPropertyItem(OrientationKey).Value[0];
            switch (orientation)
            {
              case NotSpecified: // Assume it is good.
              case NormalOrientation:
                // No rotation required.
                break;
              case MirrorHorizontal:
                thumbnail.RotateFlip(RotateFlipType.RotateNoneFlipX);
                break;
              case UpsideDown:
                thumbnail.RotateFlip(RotateFlipType.Rotate180FlipNone);
                break;
              case MirrorVertical:
                thumbnail.RotateFlip(RotateFlipType.Rotate180FlipX);
                break;
              case MirrorHorizontalAndRotateRight:
                thumbnail.RotateFlip(RotateFlipType.Rotate90FlipX);
                break;
              case RotateLeft:
                thumbnail.RotateFlip(RotateFlipType.Rotate90FlipNone);
                break;
              case MirorHorizontalAndRotateLeft:
                thumbnail.RotateFlip(RotateFlipType.Rotate270FlipX);
                break;
              case RotateRight:
                thumbnail.RotateFlip(RotateFlipType.Rotate270FlipNone);
                break;
              default:
                throw new NotImplementedException("An orientation of " + orientation + " isn't implemented.");
            }
          }
        }

        //thumbnail.RotateFlip(RotateFlipType.Rotate90FlipNone);
        thumbnail.Save(saveTo, info[1], encoderParameters);
        Debug.WriteLine($"Thumbnail from file: {originalFilename} created in {saveTo}");
      }
      catch (Exception e)
      {
        Debug.WriteLine($"Error creating thumbnail: {e.Message}");
      }
    }
POI:
int OrientationKey = 0x0112;
const int NotSpecified = 0;
const int NormalOrientation = 1;
const int MirrorHorizontal = 2;
const int UpsideDown = 3;
const int MirrorVertical = 4;
const int MirrorHorizontalAndRotateRight = 5;
const int RotateLeft = 6;
const int MirorHorizontalAndRotateLeft = 7;
const int RotateRight = 8;

if (image.PropertyIdList.Contains(OrientationKey))
{
  if (image.PropertyIdList.Contains(OrientationKey))
  {
	var orientation = (int)image.GetPropertyItem(OrientationKey).Value[0];
	switch (orientation)
	{
	  case NotSpecified: // Assume it is good.
	  case NormalOrientation:
		// No rotation required.
		break;
	  case MirrorHorizontal:
		thumbnail.RotateFlip(RotateFlipType.RotateNoneFlipX);
		break;
	  case UpsideDown:
		thumbnail.RotateFlip(RotateFlipType.Rotate180FlipNone);
		break;
	  case MirrorVertical:
		thumbnail.RotateFlip(RotateFlipType.Rotate180FlipX);
		break;
	  case MirrorHorizontalAndRotateRight:
		thumbnail.RotateFlip(RotateFlipType.Rotate90FlipX);
		break;
	  case RotateLeft:
		thumbnail.RotateFlip(RotateFlipType.Rotate90FlipNone);
		break;
	  case MirorHorizontalAndRotateLeft:
		thumbnail.RotateFlip(RotateFlipType.Rotate270FlipX);
		break;
	  case RotateRight:
		thumbnail.RotateFlip(RotateFlipType.Rotate270FlipNone);
		break;
	  default:
		throw new NotImplementedException("An orientation of " + orientation + " isn't implemented.");
	}
  }
}
With this code I was checking if image has to be rotated. Example application (at this moment still under development), you can see on my GitHub.
One example of custom section in configuration file.

App.Config:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  
  <configSections>     
    <section name="links" type="System.Configuration.NameValueSectionHandler">
    </section>
  </configSections> 
  
  <links>
      <add key="link1" value="http://milosev.com/25-c.html" />
      <add key="link2" value="http://milosev.com/84-asp-net-mvc-3.html" />
  </links>
  
  <appSettings>
      <add key="homePage" value="http://milosev.com/" />
  </appSettings>    
  
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
    </startup>
</configuration>
.NET code:
using System;
using System.Collections.Specialized;
using System.Configuration;

namespace CustomConfig
{
    class Program
    {
        static void Main(string[] args)
        {
            NameValueCollection links = ConfigurationManager.GetSection("links") as NameValueCollection;
            string homePage = ConfigurationManager.AppSettings.Get("homePage");

            Console.WriteLine("Home page: " + homePage);

            foreach (string link in links)
            {
                Console.WriteLine("Link: " + links.Get(link));
            }

            Console.WriteLine("Press any key...");
            Console.ReadKey();
        }
    }
}
In reference list you will need to add System.Configuration.

POI:

  <configSections>     
    <section name="links" type="System.Configuration.NameValueSectionHandler">
    </section>
  </configSections> 

Here is more about configSection.

Also notice line:

Console.WriteLine("Link: " + links.Get(link));

One my example of interpolated string (taken from here):

string name = "stanko";
DateTime hours = DateTime.Now;
Console.WriteLine($"Name = {name}, hours = {hours:hh}");
Console.ReadKey();

Composite string:

string name = "stanko";
Console.WriteLine("Name = {0}, hours = {1:hh}", name, DateTime.Now);
Console.ReadKey();

According to Microsoft:

Interpolated string are easier to understand than a composite format string. 

To assign IEnumerable to a new instance of IEnumerable, you will need ToList method. Here is an example:

IEnumerable instanceOne;
IEnumerable instanceTwo;

List instanceListOne = new List();

instanceListOne.Add("a");
instanceListOne.Add("b");

instanceOne = instanceListOne;
instanceTwo = instanceOne;

instanceListOne.Add("c");

foreach (string instance in instanceTwo)
{
	Console.WriteLine(instance);
}

Console.WriteLine("Press any key");
Console.ReadKey();

instanceTwo = instanceOne.ToList();
instanceListOne.Add("d");

foreach (string instance in instanceTwo)
{
	Console.WriteLine(instance);
}

Console.WriteLine("Press any key");
Console.ReadKey();

Notice first:

instanceListOne.Add("a");
instanceListOne.Add("b");

instanceOne = instanceListOne;
instanceTwo = instanceOne;

Then:

instanceListOne.Add("c");

I added firs "a" and "b" to instanceListOne, I assigned instanceListOne to instanceOne, and then I assigned instanceOne to instanceTwo, after that I added "c" to instanceListOne, then I went through instanceTwo and result is:

 

"c" is displayed also in instanceTwo.

Now to have two separate instances of IEnumerable, we need something like:

instanceTwo = instanceOne.ToList();

After that I did something like:

instanceListOne.Add("d");

Result will be still as in previous picture, "d" is not added to instanceTwo, since now we really have separate instances.

Example download from here.