Skip to content

Instantly share code, notes, and snippets.

View dabbinavo's full-sized avatar

Christian Fischerauer dabbinavo

View GitHub Profile
@dabbinavo
dabbinavo / Dockerfile
Last active February 14, 2025 19:42
.NET: Build NativeAOT enabled linux-arm on x64 host
FROM mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-arm-net9.0
RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 9.0
RUN ln -s /root/.dotnet/dotnet /usr/bin/dotnet
CMD ["/bin/bash"]
@dabbinavo
dabbinavo / LifeTimeTest.cs
Last active March 17, 2023 09:35
How does c# Lifetime work?
using System.Diagnostics;
using System.Threading;
namespace LifeTimeTest;
public class LifeTimeTest
{
public LifeTimeTest()
{
//TestLifeTime(42); // Outputs 43 one time