0% found this document useful (0 votes)
32 views1 page

Traning Codes

good

Uploaded by

limenih
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views1 page

Traning Codes

good

Uploaded by

limenih
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

using System;

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace onee
{
class Program
{
static void Main(string[] args)
{
//private List<int> list =new List<int>();
var list = new List<int>() { 1, 9 };
list.Add(10);
var list2 = new List<int>() { 2, 3, 4, 5, 6, 7, 8 };
list.InsertRange(1, list2);
//list.Reverse();
list.Reverse(6, 0);
list.Sort();

foreach (var item in list)


Console.WriteLine(item);
Console.WriteLine(list.Count);
Console.WriteLine($"Count:{list.Count}");

//Console.WriteLine(list.Find (x =>x % 3 == 0));// Only the first mach


is displayed to solve this cause use the followng
var list3 = list.FindAll(x => x % 3 == 0);
foreach (var itemm in list3)
Console.WriteLine(itemm);
Console.WriteLine(list.BinarySearch(0));

//string text = System.IO.File.ReadAllText(@"F:\Flash_Files");


//string[] t = System.IO.File.ReadAllLines(@"F:\Flash_Files");
//foreach(var ass in t)
//Console.WriteLine(ass);

Console.ReadLine();
}
}
}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy