How to use Find method with Lambda Expressions in C#?

Below is a sample source code demonstrating how to use Find method with Lambda Expression in C#

How to use Find method with Lambda Expressions in C#?

using System;

using System.Collections.Generic;

using System.Data;

using System.Linq;

namespace AbundantCode

{

internal class Program

{

//How to use Find method with Lambda Expressions in C#?

private static void Main(string[] args)

{

List<string> ABundantCodeVersions = new List<string> { "Abundantcodev1", "Abundantcodev2", "Abundantcode3" };

string NewData = ABundantCodeVersions.Find(VersionName => VersionName.Equals("Abundantcodev2"));

Console.WriteLine(NewData);

Console.ReadLine();

}

}

}