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 307 subscribers, ranking 7 335 in the Technologies & Applications category and 36 870 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 18 307 subscribers.
According to the latest data from 15 June, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by -14 over the last 30 days and by 0 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 19.46%. Within the first 24 hours after publication, content typically collects 7.27% reactions from the total number of subscribers.
- Post reach: On average, each post receives 3 563 views. Within the first day, a publication typically gains 1 331 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 16 June, 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.
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
git checkout 1b1ae50e1a69f7c659bd7d731e80b358d21c86ad
.\bootstrap-vcpkg.bat
.\vcpkg.exe install gperf:x64-windows gperf:x86-windows openssl:x64-windows openssl:x86-windows zlib:x64-windows zlib:x86-windows
▪ Далее скачиваем саму библиотеку и собираем её для .NET-проектов:
1. Переходим в папку (в командной строке) /example/csharp, т.е. туда, где будем собирать нашу библиотеку
2. Создаём папку, куда будем собирать библиотеку, и переходим в неё:
mkdir build
cd build
3. Настраиваем сборку библиотеки в зависимости от разрядности системы (x32 или x64); где "...path to vcpkg...", указываем путь до скачанного ранее vcpkg:
Для x32:
cmake -A Win32 -DTD_ENABLE_DOTNET=ON -DCMAKE_TOOLCHAIN_FILE=<path to
vcpkg>/scripts/buildsystems/vcpkg.cmake ../../..
Для x64:
cmake -A x64 -DTD_ENABLE_DOTNET=ON -DCMAKE_TOOLCHAIN_FILE=<path to
vcpkg>/scripts/buildsystems/vcpkg.cmake ../../..
4. Собираем библиотеку в зависимости от требуемой конфигурации (Release или Debug):
Для Release:
cmake --build . --config Release
Для Debug:
cmake --build . --config Debug
Готово! Теперь в папке build/Release или build/Debug (в зависимости от того, что вы выбрали) находится готовый файл Telegram.Td.dll, который и нужно использовать в своем проекте.
Продолжение
@csharp_ciInstall-Package Cledev.OpenAI
Пример с ChatGPT
var request = new CreateChatCompletionRequest
{
Model = ChatModel.Gpt35Turbo.ToStringModel(),
Stream = true,
MaxTokens = 500,
Messages = new List<ChatCompletionMessage>
{
new("system", "You are a helpful assistant."),
new("user", "Who won the world series in 2020?"),
new("assistant", "The Los Angeles Dodgers won the World Series in 2020."),
new("user", "Where was it played?")
}
};
var completions = client.CreateChatCompletionAsStream(request);
await foreach (var completion in completions)
{
Console.Write(completion.Choices[0].Message?.Content);
}
Пример генерации изображений (Dall-E)
var request = new CreateImageRequest
{
Prompt = "Once upon a time",
Size = ImageSize.Size512x512.ToStringSize(),
ResponseFormat = ImageResponseFormat.B64Json.ToStringFormat(),
N = 1
};
var response = await client.CreateImage(Request);
<img src="@response.Data[0].Url" />
@csharp_ciusing System;
class Program
{
static void Main(string[] args)
{
int num = 5;
int square = 0, cube = 0;
Mul (num, ref square, ref cube);
Console.WriteLine(square + " & " +cube);
Console.ReadLine();
}
static void Mul (int num, ref int square, ref int cube)
{
square = num * num;
cube = num * num * num;
}
}
@csharp_cinums = [-2,1,-3,4,-1,2,1,-5,4]
Вывод: 6
Объяснение: 4,-1,2,1] имеет наибольшую сумму 6.
Ввод: nums = [5,4,-1,7,8]
Вывод: 23
Решение:
public class Solution {
public int MaxSubArray(int[] nums) {
int res = nums[0], sum = nums[0], i = 1;
while (i < nums.Length)
{
if (nums[i] > nums[i] + sum) sum = nums[i];
else sum = nums[i] + sum;
if (sum > res) res = sum;
i++;
}
return res;
}
}
Пишите свое решение в комментариях👇
@csharp_cipublic static void FireAndForget(
this Task task,
Action<Exception> errorHandler = null)
{
task.ContinueWith(t =>
{
if (t.IsFaulted && errorHandler != null)
errorHandler(t.Exception);
},
TaskContinuationOptions.OnlyOnFaulted);
}
Использование:
SendEmailAsync().FireAndForget(
e => Console.WriteLine(e.Message));
2. Повтор
Для повторного выполнения задачи мы можем создать метод Retry, который позволит нам установить максимальное количество попыток и задержку между ними. Он будет работать до выполнения задачи или достижения максимальной попытки.
public static async Task<TResult>
Retry<TResult>(
this Func<Task<TResult>> taskFactory,
int maxRetries,
TimeSpan delay)
{
for (int i = 0; i < maxRetries; i++)
{
try
{
return await taskFactory()
.ConfigureAwait(false);
}
catch
{
if (i == maxRetries - 1)
throw;
await Task.Delay(delay)
.ConfigureAwait(false);
}
}
// не должно достигать этого места
return default(TResult);
}
Использование:
var result = await (
() => GetResultAsync())
.Retry(3, TimeSpan.FromSeconds(1));
3. Действие при сбое
Выполняется в случае возникновения ошибок или исключений при выполнении задачи
public static async Task
OnFailure(this Task task,
Action<Exception> onFailure)
{
try
{
await task.ConfigureAwait(false);
}
catch (Exception ex)
{
onFailure(ex);
}
}
Использование:
await GetResultAsync()
.OnFailure(ex => Console.WriteLine(ex.Message));
4. Установка временного ограничения для выполнения задачи можно использовать в тех случаях, когда необходимо предотвратить длительное выполнение данной задачи (особенно, если задача не может быть отменена токеном).
public static async Task
WithTimeout(this Task task,
TimeSpan timeout)
{
var delayTask = Task.Delay(timeout);
var completedTask = await
Task.WhenAny(task, delayTask)
.ConfigureAwait(false);
if (completedTask == delayTask)
throw new TimeoutException();
await task;
}
Использование:
await GetResultAsync()
.WithTimeout(TimeSpan.FromSeconds(1));
5. Возврат
Периодически бывает необходимо возвращать значение по умолчанию в случае неудачного выполнения задачи.
public static async Task<TResult>
Fallback<TResult>(
this Task<TResult> task,
TResult fallbackValue)
{
try
{
return await task.ConfigureAwait(false);
}
catch
{
return fallbackValue;
}
}
Использование:
var result = await GetResultAsync()
.Fallback("fallback");
▪ Статья
@csharp_ci
Available now! Telegram Research 2025 — the year's key insights 
