Yoav Avidan
Yoav Avidan

Reputation: 1

TestContext.DataRow is not supported

I am trying to convert a code from an old version of C# to a new one. Here is a minimal example:

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Example
{
class Program
{
static void Main()
{
TestContext testContext = new();

object x = testContext.DataRow.Item(2);
}
}
}

A compilation error will be raised, as DataRow property does not exist in new versions of C#. How to handle it?

Upvotes: 0

Views: 29

Answers (0)

Related Questions