سلام بر برنامه نویسان عزیز 😉 در این پست کد List.ForEach در سی شارپ #C را آماده کردم. انشاالله که این کد سی شارپ براتون مفید باشد.
کد List.ForEach در سی شارپ #C :
using System;
using System.Collections.Generic;
using System.ComponentModel;
class Primes
{
static void Main()
{
List<int> candidates = new List<int>();
for (int i=2; i <= 100; i++)
{
candidates.Add(i);
}
using System.Collections.Generic;
using System.ComponentModel;
class Primes
{
static void Main()
{
List<int> candidates = new List<int>();
for (int i=2; i <= 100; i++)
{
candidates.Add(i);
}