Получи случайную криптовалюту за регистрацию!

C# 1001 notes

Логотип телеграм канала @csharp_1001_notes — C# 1001 notes C
Логотип телеграм канала @csharp_1001_notes — C# 1001 notes
Адрес канала: @csharp_1001_notes
Категории: Технологии
Язык: Русский
Количество подписчиков: 2.63K
Описание канала:

Регулярные короткие заметки по C# и .NET.
Просто о сложном для каждого.
admin - @notxxx1

Рейтинги и Отзывы

3.50

2 отзыва

Оценить канал csharp_1001_notes и оставить отзыв — могут только зарегестрированные пользователи. Все отзывы проходят модерацию.

5 звезд

1

4 звезд

0

3 звезд

0

2 звезд

1

1 звезд

0


Последние сообщения 6

2022-02-22 16:20:00
Is there a way to catch multiple exceptions at once and without code duplication?

Consider this code.

Is there a way to catch both exceptions and only call the WebId = Guid.Empty call once?

The answer will be post soon.
369 views13:20
Открыть/Комментировать
2022-02-15 18:20:00 ​​ What is sealed Class in C#?

When
applied to a class, the sealed modifier prevents other classes from inheriting from it. In the following example, class B inherits from class A, but no class can inherit from class B.

You can also use the sealed modifier on a method or property that overrides a virtual method or property in a base class. This enables you to allow classes to derive from your class and prevent them from overriding specific virtual methods or properties.

Summary:

Once a class is defined as a sealed class, the class cannot be inherited.

Structs are also sealed.
242 views15:20
Открыть/Комментировать
2022-02-08 18:20:00
What is Extension Method in C# and how to use them?

Extension methods allow you to add methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type. An extension method is a special kind of static method, but they are called as if they were instance methods on the extended type.
186 views15:20
Открыть/Комментировать
2022-02-03 18:30:05
What is deep or shallow copy concept in C#?

Shallow Copy is about copying an object's value type fields into the target object and the object's reference types are copied as references into the target object but not the referenced object itself. It copies the types bit by bit. The result is that both instances are cloned and the original will refer to the same object.

Deep Copy is used to make a complete deep copy of the internal reference types, for this we need to configure the object returned by MemberwiseClone().

In other words a deep copy occurs when an object is copied along with the objects to which it refers.

#post
285 views15:30
Открыть/Комментировать
2022-02-02 19:50:23
I've noticed there were only 7% of correct answers ( ) on the last tricky question (I was also confused )

Let me explain why it happens.

C# specification: https://www.ecma-international.org/wp-content/uploads/ECMA-334_5th_edition_december_2017.pdf
359 views16:50
Открыть/Комментировать
2022-02-01 18:20:00
What will be the output of the following code snippet?
Anonymous Quiz
57%
Object argument
8%
double array argument
6%
Object argument, double array argument
29%
The Program compiles successfully but nothing gets printed
145 voters406 views15:20
Открыть/Комментировать
2022-02-01 18:20:00
383 views15:20
Открыть/Комментировать
2022-01-31 12:30:00
What is scope of a Internal member variable of a C# class?

Internal access specifier allows a class to expose its member variables and member functions to other functions and objects in the current assembly. In other words, any member with internal access specifier can be accessed from any class or method defined within the application in which the member is defined.

You can use it for utility or helper classes/methods that you would like to access from many other classes within the same assembly, but that you want to ensure code in other assemblies can't access.
441 views09:30
Открыть/Комментировать
2022-01-25 18:20:00
What will be the output of the following code snippet?
Anonymous Quiz
30%
True
63%
False
5%
Compilation error
2%
Error
102 voters242 views15:20
Открыть/Комментировать
2022-01-25 18:20:00
242 views15:20
Открыть/Комментировать