One example to find out number of years of oldest child in a list of parents.
using System;
using System.Collections.Generic;
using System.Linq;

namespace LINQtest
{

    public class Child
    {
        public int Age { get; set; }
    }

    public class Parent
    {
        public Child[] Kids { get; set; }
    }

    public class MyLinq
    {
        public List<Parent> Parents { get; set; }
    }

    class Program
    {
        static void Main(string[] args)
        {
            Parent parentOne = new Parent();
            parentOne.Kids = new Child[2];

            parentOne.Kids[0] = new Child();
            parentOne.Kids[0].Age = 1;

            parentOne.Kids[1] = new Child();
            parentOne.Kids[1].Age = 2;

            Parent parentTwo = new Parent();
            parentTwo.Kids = new Child[3];
            parentTwo.Kids[0] = new Child();
            parentTwo.Kids[0].Age = 5;
            parentTwo.Kids[1] = new Child();
            parentTwo.Kids[1].Age = 7;
            parentTwo.Kids[2] = new Child();
            parentTwo.Kids[2].Age = 6;

            Parent parentThree = new Parent();
            parentThree.Kids = new Child[2];
            parentThree.Kids[0] = new Child();
            parentThree.Kids[0].Age = 3;

            parentThree.Kids[1] = new Child();
            parentThree.Kids[1].Age = 4;

            MyLinq myLinq = new MyLinq();
            myLinq.Parents = new List();
            myLinq.Parents.Add(parentOne);
            myLinq.Parents.Add(parentTwo);
            myLinq.Parents.Add(parentThree);

            int maxAge = myLinq.Parents.Max(parent => parent.Kids.Max(kid => kid.Age));

            Console.WriteLine("Oldest kid is age of: " + maxAge);
            Console.WriteLine("Press any key");
            Console.ReadKey();
        }
    }
}

POI:

int maxAge = myLinq.Parents.Max(parent => parent.Kids.Max(kid => kid.Age));

Because for example code:

IEnumerable<int> maxAges = myLinq.Parents.Select(parent => parent.Kids.Max(kid => kid.Age));

Will return collection of ages in list of parents.

One dummy example of LINQ:

using System;
using System.Linq;

namespace linqExamples
{
  class Program
  {
    static void Main(string[] args)
    {
      string s = "Test";
      var test = s.Select(d => "b");
      foreach(var b in test)
      {
        Console.WriteLine(b);
      }
      Console.ReadKey();
    }
  }
}
One exampple of how to change image opacity:
private Image SetImageOpacity(Image image, float opacity)
{
	try
	{
		//create a Bitmap the size of the image provided  
		Bitmap bmp = new Bitmap(image.Width, image.Height);

		//create a graphics object from the image  
		using (Graphics gfx = Graphics.FromImage(bmp))
		{

			//create a color matrix object  
			ColorMatrix matrix = new ColorMatrix();

			//set the opacity  
			matrix.Matrix33 = opacity;

			//create image attributes  
			ImageAttributes attributes = new ImageAttributes();

			//set the color(opacity) of the image  
			attributes.SetColorMatrix(matrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap);

			//now draw the image  
			gfx.DrawImage(image
				, new Rectangle(0
					, 0
					, bmp.Width
					, bmp.Height
				)
				, 0
				, 0
				, image.Width
				, image.Height
				, GraphicsUnit.Pixel
				, attributes
			);
		}

		return bmp;
	}
	catch (Exception ex)
	{
		MessageBox.Show(ex.Message);
		return null;
	}
}
My example how use this method:
try
{
	float opacity = (float) trackBar1.Value / 100;
	panel1.BackgroundImageLayout = ImageLayout.Center;
	panel1.BackgroundImage = SetImageOpacity(myBitmap, opacity);
}
catch (Exception exception)
{
	MessageBox.Show($@"Cannot to set opacity of picture. Error message: {exception.Message}");
}
Notice that opacity is float and it can be between 0 to 1, everything bigger then 1 will have no impact. Example in Winforms you can download from here.

Taken from here.

Start new Windows Forms Application, for example, name it MyInheritance.

In solution explorer right clink on MyInheritance, like on picture:

Then, in project properties under Output type choose Console Application like on picture:

Save it. Put a button on a form (add form if it doesn't exist), build project.

 

Then, to test it, go to the File -> Add -> New project... Then choose Windows Forms Application, in the solution explorer right click on References, go to the project tab and choose MyInheritance, then right click on this new project -> Add -> New item ->Windows Forms -> Inherited Form -> Ok and this is it.

 

If you want to change a component in your inhertited form, then choose property Modifiers from MyInheritance and change it to Public.

 

Taken from here.