Библиотека шарписта | C#, F#, .NET, ASP.NET
Все самое полезное для C#-разработчика в одном канале. Наши курсы: https://clc.to/y3LDtw По рекламе: @proglib_adv Для обратной связи: @proglibrary_feeedback_bot РКН: https://gosuslugi.ru/snet/67a5c81cdc130259d5b7fead
Show more📈 Analytical overview of Telegram channel Библиотека шарписта | C#, F#, .NET, ASP.NET
Channel Библиотека шарписта | C#, F#, .NET, ASP.NET (@csharpproglib) in the Russian language segment is an active participant. Currently, the community unites 21 698 subscribers, ranking 5 943 in the Technologies & Applications category and 30 267 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 21 698 subscribers.
According to the latest data from 29 August, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by -48 over the last 30 days and by -6 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 16.72%. Within the first 24 hours after publication, content typically collects 7.84% reactions from the total number of subscribers.
- Post reach: On average, each post receives 3 628 views. Within the first day, a publication typically gains 1 702 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 23.
- Thematic interests: Content is focused on key topics such as .net, шарписта, навигация, await, string.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“Все самое полезное для C#-разработчика в одном канале.
Наши курсы: https://clc.to/y3LDtw
По рекламе: @proglib_adv
Для обратной связи: @proglibrary_feeedback_bot
РКН: https://gosuslugi.ru/snet/67a5c81cdc130259d5b7fead”
Thanks to the high frequency of updates (latest data received on 30 August, 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.
var cache = CacheBuilder
.NewLru<string, MyObject>()
.WithCapacity(1000)
.ExpireAfterAccess(TimeSpan.FromMinutes(5))
.Build();
var value = cache.GetOrAdd("key", k => new MyObject(k));
➡️ Попробовать либу
🐸 Библиотека шарписта
#sharp_viewpublic class Document
{
public string State { get; set; } = "Draft";
public void Publish()
{
if (State == "Draft") State = "Moderation";
else if (State == "Moderation") State = "Published";
else Console.WriteLine("Документ уже опубликован");
}
}
Код со State:
public interface IDocumentState
{
void Publish(Document doc);
}
public class Draft : IDocumentState
{
public void Publish(Document doc) => doc.State = new Moderation();
}
public class Moderation : IDocumentState
{
public void Publish(Document doc) => doc.State = new Published();
}
public class Published : IDocumentState
{
public void Publish(Document doc) => Console.WriteLine("Уже опубликован");
}
public class Document
{
public IDocumentState State { get; set; } = new Draft();
public void Publish() => State.Publish(this);
}
Теперь добавление нового состояния — просто новый класс, без переписывания всей логики.
🐸 Библиотека шарписта
#sharp_viewpublic string GetUserName(User? user)
{
if (user == null)
return "Anonymous";
return user.Name;
}
Плюсы:
• просто и понятно
• работает везде
Минусы:
• легко забыть проверить
• ошибки проявятся только в рантайме
С включённой фичей #nullable enable компилятор начинает помогать:
public string GetUserName(User? user)
{
return user?.Name ?? "Anonymous";
}
• User? явно говорит: объект может быть null
• компилятор подсветит, если забыли проверить
• меньше бойлерплейта, больше читаемости
🐸 Библиотека шарписта
#sharp_viewpublic record User(string Name, int Age);
Отличие от классов
Class сравнивается по ссылке. Два объекта с одинаковыми данными — разные сущности.
Record сравнивается по значению. Два объекта с одинаковыми полями — эквивалентны.
var u1 = new User("Alice", 25);
var u2 = new User("Alice", 25);
Console.WriteLine(u1 == u2); // true
Дополнительные фишки
Записи неизменяемы, но их удобно клонировать с изменением:
var u1 = new User("Alice", 25);
var u2 = u1 with { Age = 26 };
Console.WriteLine(u2); // User { Name = Alice, Age = 26 }
Можно наследовать record-тип:
public record User(string Name, int Age);
public record Admin(string Name, int Age, string Role) : User(Name, Age);
record — это синтаксический сахар, который сокращает код и делает модели данных чище и понятнее.
🐸 Библиотека шарписта
#il_люминаторvar channel = Channel.CreateBounded<int>(5);
// producer
_ = Task.Run(async () =>
{
for (int i = 0; i < 10; i++)
{
await channel.Writer.WriteAsync(i);
Console.WriteLine($"Produced {i}");
}
channel.Writer.Complete();
});
// consumer
await foreach (var item in channel.Reader.ReadAllAsync())
{
Console.WriteLine($"Consumed {item}");
}
Почему это лучше, чем ConcurrentQueue? Потому что Channel создан сразу с учётом асинхронности. Вам не нужно городить блокировки и таймеры ожидания — достаточно написать await reader.ReadAsync(), и код будет сам по себе масштабироваться без блокировки потоков.
🐸Библиотека шарписта
#sharp_view