Sign in to queue

The Discussion

  • User profile image
    Dave

    absolute *

  • User profile image
    Jan Willem Zondag

    How to set project level nullable context?

  • User profile image
    Flem100

    Cool thanks! :D

  • User profile image
    ArneG

    What is in store for VB.net?

  • User profile image
    SergeyV

    @Jan Willem Zondag

    in .csproj file:

    <PropertyGroup>
    ...
    <NullableReferenceTypes>true</NullableReferenceTypes>
    <LangVersion>8.0</LangVersion>
    </PropertyGroup>
  • User profile image
    GodwinK

    What is "default" for non-nullable string?

    string str = default; // converting null literal or possible null value to non- / // nullable type

    This gives the same warning as replacing "default" with null;

  • User profile image
    Mads​Torgersen

    @ArneG: Kathleen posted about VB a couple of weeks ago:
    https://blogs.msdn.microsoft.com/vbteam/2018/11/12/visual-basic-in-net-core-3-0/

  • User profile image
    Mads​Torgersen

    @GodwinK: Nullable reference types do not change runtime semantics of the language - all they do is add warnings. So default(string) remains null, but gets a warning.

  • User profile image
    Mahdi

    For a kind of project i am doing i am generating a schema from functions header/prototype. Currently i have two generic classes NonNull<T> and Nullable<T>. My version of Nullable is different to C#'s.

    void MyFunc(NonNull<string> a, Nullable<string> b)
    {

    }

    Then i generate some schema using Reflection in run-time.

    I tried the same thing with C# 8.0 but running Console.WriteLine(typeof(string?).Name) prints String.

    Is there any solution i can know if the function argument is nullable or not ?

  • User profile image
    LokiMidgard

    Can the IAsyncEnumerable already be tested in Visual Studop 2019 prview 1 with .NET Core SDK 3.0.100-preview-009812?

    While consuming seems to be no problem using yield return in an Method returning IAsyncEnumerable can't compile. With an strange error

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\15.0\Bin\Roslyn\Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.exe" wurde mit dem Code -2146232797 beendet.

  • User profile image
    Nick


    LokiMidgard, this is what happens when you have German developers in your team :-))))

Add Your 2 Cents