سلام بر تمامی برنامه نویسان #C 😉 در این مطلب کد linq:کوئری زدن روی یک رشته (شروع شدن با یک عبارت) با String.StartsWith در سی شارپ را آماده کردم. انشاالله که این کد براتون مفید باشه.
کد linq:کوئری زدن روی یک رشته (شروع شدن با یک عبارت) با String.StartsWith در سی شارپ :
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass {
public static void Main() {
string[] presidents = {"Ad", "Ar", "Bu", "B", "C", "C"};
string president = presidents.Where(p => p.StartsWith("Ad")).First();
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass {
public static void Main() {
string[] presidents = {"Ad", "Ar", "Bu", "B", "C", "C"};
string president = presidents.Where(p => p.StartsWith("Ad")).First();