ICollection: چک کردن وجود یک عنصر در Collection در #C
سلام بر تمامی برنامه نویسان سی شارپ 😉 در این مطلب ، ICollection: چک کردن وجود یک عنصر در Collection در سی شارپ #C رو براتون آماده کردم. انشاالله که این کد براتون مفید باشه.
خروجی پروژه به این صورت می باشد:
Contains 105? True
Contains 232? True
Contains 232? True
ICollection: چک کردن وجود یک عنصر در Collection :
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);