C# (C Sharp) programming
По всем вопросам- @notxxx1 Реестр РКН: https://clck.ru/3Fk3kb #VRHSZ
Show more📈 Analytical overview of Telegram channel C# (C Sharp) programming
Channel C# (C Sharp) programming (@csharp_ci) in the Russian language segment is an active participant. Currently, the community unites 18 030 subscribers, ranking 7 242 in the Technologies & Applications category and 36 510 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 18 030 subscribers.
According to the latest data from 29 October, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by -54 over the last 30 days and by -9 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 15.19%. Within the first 24 hours after publication, content typically collects 8.07% reactions from the total number of subscribers.
- Post reach: On average, each post receives 2 738 views. Within the first day, a publication typically gains 1 455 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 0.
- Thematic interests: Content is focused on key topics such as .net, api, логика, архитектура, string.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“По всем вопросам- @notxxx1
Реестр РКН: https://clck.ru/3Fk3kb
#VRHSZ”
Thanks to the high frequency of updates (latest data received on 30 October, 2026), the channel maintains relevance and a high level of publication reach. Analytics show that the audience actively interacts with content, making it an important point of influence in the Technologies & Applications category.
using System;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
Console.WriteLine("1");
var task = FooAsync();
Console.WriteLine("2");
await task;
Console.WriteLine("5");
}
static async Task FooAsync()
{
Console.WriteLine("3");
await Task.Delay(100);
Console.WriteLine("4");
}
}
❓ Вопрос:
Какой порядок чисел появится в консоли?
👇 Подумай, прежде чем смотреть ответ.
—
✅ Разбор:
1. Console.WriteLine("1"); → печатает 1
2. var task = FooAsync(); → вызывается FooAsync(), который:
печатает 3
доходит до await Task.Delay(100); и возвращает управление в Main (не дожидаясь задержки)
3. Console.WriteLine("2"); → печатает 2
4. await task; → теперь Main ждёт завершения FooAsync
5. после 100ms продолжает выполнение в FooAsync → печатает 4
6. возвращаемся в Main → печатает 5
—
🎉 Окончательный вывод:
1
3
2
4
5
📝 Что проверяет задача:
- Понимание работы async/await
- Как работают точки приостановки (suspension points)
- Когда код возвращается в вызывающий метод
#CSharp #AsyncAwait #InterviewQuestion #CodeChallenge
@csharp_ci
$ErrorActionPreference = "Stop"
$rootFolder = Resolve-Path -Path "."
$oldName = "Sample.Foo"
$newName = "Sample.Bar"
# Rename files and folders
foreach ($item in Get-ChildItem -LiteralPath $rootFolder -Recurse | Sort-Object -Property FullName -Descending) {
$itemNewName = $item.Name.Replace($oldName, $newName)
if ($item.Name -ne $itemNewName) {
Rename-Item -LiteralPath $item.FullName -NewName $itemNewName
}
}
# Replace content in files
foreach ($item in Get-ChildItem -LiteralPath $rootFolder -Recurse -Include "*.cmd", "*.cs", "*.csproj", "*.json", "*.md", "*.proj", "*.props", "*.ps1", "*.sln", "*.slnx", "*.targets", "*.txt", "*.vb", "*.vbproj", "*.xaml", "*.xml", "*.xproj", "*.yml", "*.yaml") {
$content = Get-Content -LiteralPath $item.FullName
if ($content) {
$newContent = $content.Replace($oldName, $newName)
Set-Content -LiteralPath $item.FullName -Value $newContent
}
}
@csharp_ci
using System;
using System.Collections.Generic;
class Program
{
static void Main()
{
var funcs = new List<Func<int>>();
// Первая группа лямбд
for (int i = 0; i < 4; i++)
{
funcs.Add(() => i * i);
}
Console.Write("Squares: ");
foreach (var f in funcs)
Console.Write(f() + " ");
Console.WriteLine();
// Вторая группа лямбд с копией переменной
funcs.Clear();
for (int i = 0; i < 4; i++)
{
int j = i;
funcs.Add(() => j * j);
}
Console.Write("SquaresWithCopy: ");
foreach (var f in funcs)
Console.Write(f() + " ");
}
}
Ответ:
Squares: 16 16 16 16
SquaresWithCopy: 0 1 4 9
Объяснение
Первая группа лямбд
Лямбды захватывают переменную i по ссылке. К моменту, когда мы их вызываем в foreach, цикл уже завершился, поэтому i == 4. Каждая лямбда вычисляет 4 * 4 → 16.
Вторая группа лямбд
Внутри цикла для каждого значения i создаётся новая локальная переменная j, и лямбда захватывает именно её. При первой итерации j = 0, при второй j = 1 и т. д. Поэтому j * j даёт 0, 1, 4, 9 соответственно.
Такой приём (захват локальной копии переменной) позволяет избежать «одинообразного» результата и сохранить значение каждой итерации.