3using System.Collections.Generic;
6using System.Threading.Tasks;
31 foreach (
string str
in rgstr)
45 RegistryKey baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);
46 RegistryKey key = baseKey.OpenSubKey(
@"SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL");
47 List<string> rgstr =
new List<string>();
52 foreach (
string str
in key.GetValueNames())
54 rgstr.Add(
".\\" + str);
The DatabaseInstanceQuery class is used to find all installed instances of SQL on a given machine.
static string GetInstancesAsText()
Returns a list of the SQL instances as a string.
DatabaseInstanceQuery()
The constructor.
static List< string > GetInstances()
Returns a list of the SQL instances as a list of strings.
The MyCaffe.db.image namespace contains all image database related classes.