asked on
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat"
cd C:\AutomationTestSamples\AutomationTestSamples\bin\Debug
start cmd /k vstest.console.exe AutomationTestSamples.dll /Logger:trx;LogFileName=%1/UnitTest1.trx /testcasefilter:FullyQualifiedName~AutomationTestSamples.UnitTest1.trx
string[] str = File.ReadAllLines(@"C:\Test\test.bat");
for (int i = 0; i < str.Length; i++)
{
if (str[i].Contains(trxName))
{
str[i].Replace(str[i].Substring(str[i].IndexOf("/testcasefilter")), "/test");
}
}
ASKER
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
TRUSTED BY
In the code sample above you are just reading the file contents in an string array. You need to write back those lines to the file as well to get the desired results.
Also string.Replace https://docs.microsoft.com
Regards,
Chinmay.