linq metodlari bilan ishlash
Page preview (3 pages)
Scroll down 👇About "linq metodlari bilan ishlash"
1. string[] people = { "tom", "tim", "bob", "sam" }; // проверяем, все ли элементы имеют длину в 3 символа bool allhas3chars = people.all(s => s.length == 3); // true console.writeline(allhas3chars); // проверяем, все ли строки начинаются на t bool allstartswitht = people.all(s => s.startswith("t")); // false console.writeline(allstartswitht); 2. string[] people = { "tom", "tim", "bob", "sam" }; // проверяем, все ли элементы имеют длину больше 3 символов bool allhasmore3chars = people.any(s => s.length > 3); // false console.writeline(allhasmore3chars); // проверяем, все ли строки начинаются на t bool allstartswitht = people.any(s => s.startswith("t")); // true console.writeline(allstartswitht); 3. string[] people = { "tom", "tim", "bob", "sam" }; // проверяем, есть ли строка tom bool hast...
This file contains 3 pages in DOCX format (17.8 KB). To download "linq metodlari bilan ishlash", click the Telegram button on the left.