Hello, I am new to C# and programming in general my question is how do you call a variable that is in a different namespace? if I have this code
public void servicevalues(string _servicename)
{
string servicename = _servicename;
string query = string.Format("SELECT * FROM Win32_Service WHERE Name ='{0}'", servicename);
ManagementObjectSearcher moquery = new ManagementObjectSearcher(query);
ManagementObjectCollection queryCollection = moquery.Get();
foreach (ManagementObject service in queryCollection)
{
string serviceId = Convert.ToString(service["DisplayName"]);
bool serviceResult = Convert.ToBoolean(service["Started"]);
}
and I am passing in service name how would I call one or multiple variable values from a different namespace?