سلام بر برنامه نویسان عزیز ایران زمین 😉 در این مطلب از وب سایت پروگرم 98 کد linq:شمارش تعداد آیتمهایی در آرایه رشته ای که با H شروع می شوند با Count و StartsWith در سی شارپ #C را آماده کردم. انشاالله که این کد براتون مفید باشه.
کد linq:شمارش تعداد آیتمهایی در آرایه رشته ای که با H شروع می شوند با Count و StartsWith در سی شارپ #C :
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass {
public static void Main() {
string[] presidents = {"G", "H", "a", "H", "over", "Jack"};
int count = presidents.Count(s => s.StartsWith("H"));
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass {
public static void Main() {
string[] presidents = {"G", "H", "a", "H", "over", "Jack"};
int count = presidents.Count(s => s.StartsWith("H"));