-
Net introduced the [DoesNotReturn] and [DoesNotReturnIf] attributes are part of nullability static analysis: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/attributes/nullable-anal…
-
### Background and motivation
Currently, `InvalidEnumArgumentException` only "supports" `int`-backed enumerations (and consequently `byte`, `sbyte`, `ushort`, and `short`) as it requires a cast to …
-
```vb
Imports System.Diagnostics.CodeAnalysis
Public Module Program
Public Sub Main(args As String())
Test(args.Length = 0)
If args.Length = 0 Then ' Expected diagnostic her…
-
- Verify the effects on coverage outcome with/without this annotation and remove where unneeded.
- Consider [excluding certain attributes](https://github.com/coverlet-coverage/coverlet/blob/master/Do…
-
C#11, .Net 7.
Contrived example:
```cs
record SomeResult(bool Success);
record SomeEntity();
void DoSomethingWith(SomeEntity entity) { }
void MyFunction()
{
…
-
@gafter commented on [Thu Jan 12 2017](https://github.com/dotnet/roslyn/issues/16466)
@gafter ported this from a customer-reported issue on Microsoft-internal URL [https://vsfeedback/comment/736281](…
-
**Version Used**: main (12 Jan 2023)
**Steps to Reproduce**:
```cs
using System;
using System.Diagnostics.CodeAnalysis;
class C
{
public static double GetDouble(object o)
{
…
-
## Problem
In the current setup, there is no way of telling that a method will throw an exception so that the code after will not be executed. A small example:
```csharp
bool Throw()
{
try
…
-
**Version Used**: .NET 7.0
**Steps to Reproduce**:
Compile [the following code](https://sharplab.io/#v2:CYLg1APgAgTAjAWAFBQAwAIpwHQBECWAhgOYB2A9gM4Au+AxpdgMLnACmAgqYQDYCelfJQDcyZFADMmGOiboA3uKl…
-
### Description
S2259 is raised even if tested before with custom assertion method. This issue therefore is similar to https://github.com/SonarSource/sonar-dotnet/issues/349 with the difference tha…
llfab updated
2 years ago