Gets the String value associated with the first occurrence of the specified String key.

Namespace: CodeSmith.CustomProperties
Assembly: CodeSmith.CustomProperties (in CodeSmith.CustomProperties.dll) Version: 6.0.0.0 (7.0.0.15127)

Syntax

C#
public virtual string GetByKey(
	string key
)
Visual Basic
Public Overridable Function GetByKey ( 
	key As String
) As String

Parameters

key
Type: System..::..String
The String key whose value to get.

Return Value

Type: String
The String value associated with the first occurrence of the specified key, if found; otherwise, a null reference.

Remarks

GetByKey and SetByKey(String, String) emulate the indexer of the SortedList class but require linear time to locate a key.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionkey is a null reference.

See Also