IniFile.SetSectionData Method

IniFileIO

IniFileSetSectionData Method

IniFileIO Documentation
Sets the comments of the section with the specified name.

Namespace:  IniFileIO
Assembly:  IniFileIO (in IniFileIO.dll) Version: 1.4.0.6028 (1.4.0.06028)
Syntax

public bool SetSectionData(
	string name,
	int order = 2147483647,
	string comments = null,
	List<IniFileKey> keys = null,
	bool createIfNotExist = true
)
Public Function SetSectionData ( 
	name As String,
	Optional order As Integer = 2147483647,
	Optional comments As String = Nothing,
	Optional keys As List(Of IniFileKey) = Nothing,
	Optional createIfNotExist As Boolean = true
) As Boolean
public:
bool SetSectionData(
	String^ name, 
	int order = 2147483647, 
	String^ comments = nullptr, 
	List<IniFileKey>^ keys = nullptr, 
	bool createIfNotExist = true
)
member SetSectionData : 
        name : string * 
        ?order : int * 
        ?comments : string * 
        ?keys : List<IniFileKey> * 
        ?createIfNotExist : bool 
(* Defaults:
        let _order = defaultArg order 2147483647
        let _comments = defaultArg comments null
        let _keys = defaultArg keys null
        let _createIfNotExist = defaultArg createIfNotExist true
*)
-> bool 

Parameters

name
Type: SystemString
Name of the target section.
order (Optional)
Type: SystemInt32
Order to set.
comments (Optional)
Type: SystemString
Comments to set.
keys (Optional)
Type: System.Collections.GenericListIniFileKey
Collection of full keys to set.
createIfNotExist (Optional)
Type: SystemBoolean
When True, if the target section with the specified name does not exist, it is created. When False, if the section does not exist, no action is taken.

Return Value

Type: Boolean
Whether the specified section was updated or created. False should only be returned in calls where createIfNotExist is set to False.
Remarks

In the event of multiple sections with the same name, only the first occurrance is updated.
See Also

Reference