SharpLab
SharpLab copied to clipboard
.NET language playground
When I select the `Roles/Extensions` branch, I get a message that says **connection lost, reconnecting...** and the screen goes grey and doesn't come back. When I look at the browser...
```c# // var x = new int[100]; // works fine var x = new int[101]; System.Console.WriteLine(x.Length); ``` This code throws: > Unbreakable.Runtime.MemoryGuardException: Total allocation limit reached (collections and strings). in...
the new F# feature seems to be missing or not yet supported in Sharplab, is there any hope of seeing them included soon ?
update `net7.0` to `net8.0` for the $binPath, fixes error ``` Line | 101 | $acl = Get-Acl $binPath | ~~~~~~~~~~~~~~~~ | Cannot find path './bin/Debug/net7.0' because it does not exist....
Use Environment.ProcessId for current processId
> `error CS9240: Target runtime doesn't support by-ref-like generics.` ```cs using System; void M(T disposable) where T : IDisposable, allows ref struct { disposable.Dispose(); } ``` https://sharplab.io/#v2:EYLgtghglgdgNAFxANwKYCcoDMCeAfAAQCYBGAWAChKCAWAAgFkAeAFQD4AKFugEygGcADgHt+EYABtUASjoB3ABYZUdbiDoBJACICRYyajh0IEicLn866VFjr8E6AK4BjBJQDelOt967R4qQA6HSFRVA5pAG5KAF8gA
The https://github.com/dotnet/roslyn/commits/features/field-keyword branch replaces https://github.com/dotnet/roslyn/commits/features/semi-auto-props in implementing for . Implementation has just started going into the `features/field-keyword` branch, e.g. , and it would be great to test it out and...
[sharplab](https://sharplab.io/#v2:C4LgTgrgdgNAJiA1AHwAIAYAEqCMA6AJWmAEsBbAUzwGEB7MgBxIBsKwBlNgNxIGMKAzgG4AsAChxAFUHAAFABIARAG8cAJgDMAX0UBKIZkOYpMhYvOrNO8/vHjcANmwAWTNIFywFAGaYAIj4AhhDMwACSUMBsDLTMgVFw7MBgJFAA5gASgVBwrGCYFAAeDBS8CbriyuJaQA) ```csharp using System.Runtime.CompilerServices; Test($"{123}"); Test($"""{123}"""); static void Test(ref DefaultInterpolatedStringHandler expected) { } ``` The above code throws a VerificationException when in Run mode: ``` System.Security.VerificationException: Method SharpLab.Runtime.Internal.Flow.ReportRefValue: type argument...
Using five or more attribute lists causes `RoslynSourceTextGuardException`: ``` MirrorSharp.Advanced.EarlyAccess.RoslynSourceTextGuardException: Exceeded limit on consecutive []. at SharpLab.Server.MirrorSharp.Guards.RoslynSourceTextGuard.ValidatingSourceTextWriter.ValidateBrackets(Char char, Char openBracket, Char closeBracket, Int32& nestingLevel, Int32[] adjacentPairCounts, Boolean allowTopLevelAdjacentPairs) in D:\a\SharpLab\SharpLab\source\Server\MirrorSharp\Guards\RoslynSourceTextGuard.cs:line...