سلام 😉 در این مطلب از وب سایت پروگرم 98 آموزش linq: گروه کردن (Group) کلمات بر اساس طول آنها در سی شارپ را آماده کردم. انشاالله که این کد سی شارپ براتون مفید باشد.
کد linq: گروه کردن (Group) کلمات بر اساس طول آنها در سی شارپ :
using System;
using System.Linq;
class HelloWorld {
static void Main() {
string[] words = { "A", "ss", "w", "ccc", "a" };
var groups =
from word in words
orderby word ascending
group word by word.Length into lengthGroups
using System.Linq;
class HelloWorld {
static void Main() {
string[] words = { "A", "ss", "w", "ccc", "a" };
var groups =
from word in words
orderby word ascending
group word by word.Length into lengthGroups