IVsSettingsStore.GetStringOrDefault Method
Returns a string type property value or a given default string.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assemblies: Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)
Syntax
'Declaration
Function GetStringOrDefault ( _
collectionPath As String, _
propertyName As String, _
defaultValue As String, _
<OutAttribute> ByRef value As String _
) As Integer
int GetStringOrDefault(
string collectionPath,
string propertyName,
string defaultValue,
out string value
)
int GetStringOrDefault(
[InAttribute] String^ collectionPath,
[InAttribute] String^ propertyName,
[InAttribute] String^ defaultValue,
[OutAttribute] String^% value
)
abstract GetStringOrDefault :
collectionPath:string *
propertyName:string *
defaultValue:string *
value:string byref -> int
function GetStringOrDefault(
collectionPath : String,
propertyName : String,
defaultValue : String,
value : String
) : int
Parameters
collectionPath
Type: String[in] The path of the collection.
propertyName
Type: String[in] The property name.
defaultValue
Type: String[in] The default value to return if the property is not set.
value
Type: String%[out] The value. This should be passed as an uninitialized BSTR and the method will allocate enough space to hold the value of the property. The caller should call SysFreeString to release the BSTR when it is no longer needed.
Return Value
Type: Int32
Returns S_OK if the property was returned, S_FALSE if the property does not exist, or E_INVALIDARG if the property type is not an integer.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.