Invoke code (C#) - doubts

Hi… i’m trying to invoke C# code in uipath studio…the code is about a list for students and id…and from that i’m using lambda expression for select particular ID and name…PFB the code which i wrote in C#…also pls guide me the same code invoking in uipath studio
TIA :slight_smile:
public static void Main(string args)
{

        List<Student> liststudent = new List<Student>()
        {
            new Student{ID = 101, Name = "Mark"},
            new Student{ID = 102, Name = "Jon"},
            new Student{ID = 103, Name = "Kim"},
            new Student{ID = 104, Name = "Naveen"},
            new Student{ID = 105, Name = "Krishna"},
            new Student{ID = 106, Name = "Abishek"},
            new Student{ID = 106 , Name = "Abishek"},
            new Student{ID = 104, Name = "Naveen"}

        };

        Student student = liststudent.Find(x => x.ID == 102);
        Console.WriteLine("ID = {0}, Name = {1}", student.ID, student.Name);
        int count = liststudent.Count(x => x.Name.StartsWith("N"));
        Console.WriteLine("Count = " + count);
        List<int> distinctdata = liststudent.Select(x => x.ID).Distinct().ToList();
        foreach(var i in distinctdata)
        {
            Console.WriteLine(i);
        }
        //Console.WriteLine(distinctdata);
        Console.ReadKey();

    }

    public class Student
    {
        public int ID;
        public string Name;
    }

Have a look here as we can simulate the Student class by Tuple / Dictionary for the LINQ learning purpose.

Also have a look here for LINQ learning:

sure thanks! :slight_smile:

Please check these videos. They could help you further in your issue. All these videos are with C# in UiPath:

Best regards
Mahmoud

sure thanks :slight_smile: