Skip to main content
Ivan Petrov's user avatar
Ivan Petrov's user avatar
Ivan Petrov's user avatar
Ivan Petrov
  • Member for 9 years, 4 months
  • Last seen this week
17 votes
Accepted

Why (-1 - int.MinValue) does not cause integer overflow?

17 votes
Accepted

Seeking an explanation for the change in order of widening operations from .NET Framework 4.8 to .NET 8

14 votes
Accepted

Is changing an abstract method to virtual a breaking change?

9 votes
Accepted

Why is IEnumerator.Current not nullable?

8 votes
Accepted

"Cannot implicitly convert type" error only when generic is instantiated with an interface

6 votes
Accepted

Why is my operator ++ more than twice as fast as its equivalent instance method?

6 votes

what is the correct way to write byte array into unmanaged memory?

6 votes

Why is ICollection<T> treated differently in collection expression syntax?

6 votes
Accepted

C#: Nullable Generic Types, unexpected behavior

6 votes
Accepted

C# Returning Struct by ref results in copy

6 votes
Accepted

The auto-completion for await changes the method's signature - how do I prevent that?

6 votes

C# LINQ Dynamic - Against a DataTable - Syntax not working?

6 votes

How can I run individual C# files without having to make a project?

6 votes
Accepted

Why does an inherited class not get JSON serialized correctly?

5 votes

C# - Function that accepts delegate with variadic arguments

5 votes
Accepted

C#/.NET: why can't I pass ref readonly variable into another method that require ref readonly variable?

5 votes
Accepted

Why does .NET System.Diagnostics.Debug not match the source code?

5 votes
Accepted

Why don't anonymous types overload the == and != operators (but records do)?

5 votes
Accepted

Is it possible to get underlying type of Nullable<T> if default value is set to null

5 votes
Accepted

How to match any parameters in Setup() without using It.IsAny<T>?

5 votes
Accepted

Why does direct throwing OperationCanceledException cancels the task

5 votes
Accepted

Cannot reflect on InteropServices attributes

5 votes
Accepted

Does a thread lingering within an instance member method keep the instance alive if all other references are dropped?

5 votes

How does params `IReadOnlyCollection<T>` work when `IReadOnlyCollection<T>` does not have an Add method?

5 votes
Accepted

Why does 'return x switch' generates 'if (1 == 0)' in ILSpy?

4 votes
Accepted

Why can't I return a List<List<T>> when the return type is IList<IList<T>> in C#?

4 votes

Can I pass object array as multiple arguments of params method in C#?

4 votes
Accepted

Is it possible to mask a reference with an interface without heap allocating?

4 votes
Accepted

C# HashSet but Want to Force Exception When Adding Duplicates

4 votes

C# - How to instantiate an object with constraint from existing interface method without constraint

1
2 3 4 5
9