New to C# programming, and I'm kind of stuck right now. How would I create a simple program that let's me extract and display the data source value in connectionStrings. And lets me modify the Id and password? Am I on the right track with parsing
Document X = XDocument.Load("C:\Users\Odd_Creature\Desktop\SecureConfig\\UserProfiles\UserInfo.exe.config")
var configuration= X.Element("configuration").Element("connectionStrings");
var location = configuration.Descendants("").Attributes("").FirstOrDefault().Value;
doc.Save(xmlfile);
XMLFILE
<configuration>
<configProtectedData />
<system.diagnostics />
<system.windows.forms />
<uri />
<appSettings>
<add key="GenerateProfile" value="true" />
<add key="TestScore" value="30" />
<add key="TestApplicationName" value="User Account" />
</appSettings>
<connectionStrings>
<add name="MyExample.database" connectionString="data source=.\SQLEXPRESS;initial catalog=wadb;integrated security=false;encrypt=true;trustservercertificate=true;User Id=Tester;Password=Test1;"
providerName="System.Data.SqlClient" />
</connectionStrings>