 | ConnectionStringGetComponent Method |
Get an individual component part of the connection string
Namespace: SanteDB.Core.Configuration.DataAssembly: SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.2081-alpha+b4ae72647f2cc271f89142f76fff26ad69e00f5a
Syntaxpublic string GetComponent(
string component
)
Public Function GetComponent (
component As String
) As String
public:
String^ GetComponent(
String^ component
)
member GetComponent :
component : string -> string Parameters
- component String
- The name of the component
Return Value
StringThe value of the component
Examplevar cstr = new ConnectionString("npgsql", "server=foo;database=bar;user=yosemite;password=Sam");
Console.Write(cstr.GetComponent("server"));
Console.Write(cstr.GetComponent("database"));
Output:
foo
bar
See Also