-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab114e8
commit f1715bb
Showing
3 changed files
with
127 additions
and
9 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
IntelliTect.Analyzer/IntelliTect.Analyzer.Test/Data/DateTime_ImplicitConversion_InLinq.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace ConsoleApp1 | ||
{ | ||
internal class Pair | ||
{ | ||
public DateTimeOffset DateTimeOffset { get; init; } | ||
public DateTime DateTime { get; init; } | ||
|
||
public Pair(DateTimeOffset dateTimeOffset, DateTime dateTime) | ||
{ | ||
DateTimeOffset = dateTimeOffset; | ||
DateTime = dateTime; | ||
} | ||
} | ||
|
||
internal class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
List<Pair> list = new(){ new(DateTimeOffset.Now, DateTime.Now) }; | ||
_ = list.Where(pair => pair.DateTimeOffset < pair.DateTime); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters