This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Text.Json; | |
| using Azure.Messaging.ServiceBus; | |
| using Microsoft.AspNetCore.Mvc; | |
| namespace TodoApi3.Controllers; | |
| [ApiController] | |
| [Route("[controller]")] | |
| public class WeatherForecastController : ControllerBase | |
| { | |
| private static readonly string[] Summaries = new[] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Text.Json; | |
| using Azure.Messaging.ServiceBus; | |
| using Microsoft.AspNetCore.Mvc; | |
| namespace TodoApi3.Controllers; | |
| [ApiController] | |
| [Route("[controller]")] | |
| public class WeatherForecastController : ControllerBase | |
| { | |
| private static readonly string[] Summaries = new[] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| namespace LINQDemo | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| List<int> intList = new List<int> { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| namespace LINQDemo | |
| { | |
| public class Employee | |
| { | |
| public int ID { get; set; } | |
| public string FirstName { get; set; } | |
| public string LastName { get; set; } | |
| public int Salary { get; set; } | |
| public static List<Employee> GetEmployees() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| namespace LINQDemo1 | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| List<Student> studentList = new List<Student>() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| namespace LINQDemo | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| List<Student> studentList = new List<Student>() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace System.Collections.Generic | |
| { | |
| ...public interface IEnumerable<out T>:IEnumerable | |
| { | |
| ...IEnumerable GetEnumerator(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace System.Collections | |
| { | |
| ...public interface IEnumerable | |
| { | |
| ...IEnumerator GetEnumerator(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static IEnemurable<TSource> Where<TSource>(this IEnemurable<TSource> source, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List<int> intList =new List<int>{1,2,3,4,5,6,7,8,9,10}; | |
| IEnumeralbe<int> EvenNumberList =intList.Where(n=> n%2 == 0); |
NewerOlder