The target process exited while evaluating the function System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode

Viewed 41

Why would string interpolation fail when debugging a unit test?

Unit test

Usings include

using Microsoft.Data.SqlClient;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

The following works OK

    [TestMethod]
    public void Mult()
    {
        var coeff = (decimal) 0.0015;
        var edge = (int)400;
        var n = coeff * edge;
        var s = $"n is "+n.ToString();
        Debug.Print(s);
    }
0 Answers
Related