Skip to content

Instantly share code, notes, and snippets.

View lomholdt's full-sized avatar

Jonas Lomholdt lomholdt

View GitHub Profile
@lomholdt
lomholdt / Directory.Build.props
Last active January 4, 2022 20:19
Make internals visible to other projects (eg. test projects)
<Project>
<Target Name="InternalsVisibleToTask" BeforeTargets="GenerateAdditionalSources" Condition="@(InternalsVisibleTo) != ''">
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>%(InternalsVisibleTo.Identity)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Target>
@bartdesmet
bartdesmet / InExpression_2025.MD
Last active December 11, 2025 13:00
Azure Dev Summit 2025 - Add a new `in` expression to C#

Add a new in expression to C#

Goals

In this workshop, we'll add a new in expression to C#, with example use cases shown below:

x in 1..10     // x >= 1 && x < 10
'a' in "bar"   // "bar".IndexOf('a') >= 0   -or-   "bar".Contains('a')
x in xs // xs.Contains(x)