ICollection: نمایش عناصر Collection با foreach در #C
سلام بر تمامی برنامه نویسان سی شارپ 😉 در این مطلب ، ICollection: نمایش عناصر Collection با foreach در سی شارپ #C رو براتون آماده کردم. انشاالله که این کد براتون مفید باشه.
خروجی پروژه به این صورت می باشد:
105
232
350
232
350
ICollection: نمایش عناصر Collection با foreach :
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
public class MainClass
{
public static void Main()
{
ICollection<int> myCollection = new Collection<int>();
myCollection.Add(105);
myCollection.Add(232);
myCollection.Add(350);
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
public class MainClass
{
public static void Main()
{
ICollection<int> myCollection = new Collection<int>();
myCollection.Add(105);
myCollection.Add(232);
myCollection.Add(350);