Config Helper
ReadFromCustomSection Method
Example 



KellermanSoftware.ConfigHelper Namespace > ConfigReaderWriter Class : ReadFromCustomSection Method
Read a setting from a custom section
Syntax
Public Function ReadFromCustomSection( _
   ByVal sectionName As String, _
   ByVal settingName As String _
) As String
Dim instance As ConfigReaderWriter
Dim sectionName As String
Dim settingName As String
Dim value As String
 
value = instance.ReadFromCustomSection(sectionName, settingName)
public string ReadFromCustomSection( 
   string sectionName,
   string settingName
)
public:
String^ ReadFromCustomSection( 
   String^ sectionName,
   String^ settingName
) 

Parameters

sectionName
settingName
Example
//Trial Mode
ConfigReaderWriter config = new ConfigReaderWriter();
 
//License Mode
//ConfigReaderWriter config = new ConfigReaderWriter("John Smith 10000", "psdfljksfdl==");
 
config.WriteConnectionString("MyConnectionString", "MyConnectionStringValue");
 
Console.WriteLine(config.ReadFromCustomSection("connectionStrings", "MyConnectionString"));
'Trial Mode
Dim config As New ConfigReaderWriter()
 
'License Mode
'Dim config As New ConfigReaderWriter("John Smith 10000", "psdfljksfdl==")
 
config.WriteConnectionString("MyConnectionString", "MyConnectionStringValue")
 
Console.WriteLine(config.ReadFromCustomSection("connectionStrings", "MyConnectionString"))
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ConfigReaderWriter Class
ConfigReaderWriter Members