I feel the most confusing aspect in learning C# .NET Visual Studio is finding code on the Internet (below) that appears to be good C# coding, however I'm not sure how to use the 'automatic' drag-n-drop features to avoid coding the old way.
Q. How would the code snippet below look if coded using C# .NET Visual Studio???
private void PopAbsent()
//List Absent Reps
string v_tsql = "SELECT RTRIM([rep]) FROM Supportstats.dbo.absent_rep";
SqlConnection myConnection = new SqlConnection(v_sqlconnstring);
SqlCommand myCommand = new SqlCommand(v_tsql,myConnection);
SqlDataReader myReader = myCommand.ExecuteReader();
string v_repname = myReader.GetString(0);
MessageBox.Show("Unable establish SQL Connection.\nVarify settings and try again.", "SQL Connection Test: Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);