Gemstone Common Library
Show/Hide TOC

# StringExtensionsToNonNullString T(T) Method

Converts value to string; null objects (or DBNull objects) will return an empty string ("").

## Definition

Namespace: Gemstone.StringExtensions
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.175 -- Release Build+70cfebd19f80455d07e1cf93607e59f6af0e38f4
C#
View Source Request Example

    public static string ToNonNullString<T>(
    	this T value
    )
    where T : class

VB
View Source Request Example

    <ExtensionAttribute>
    Public Shared Function ToNonNullString(Of T As Class) (
    	value As T
    ) As String

C++
View Source Request Example

    public:
    [ExtensionAttribute]
    generic<typename T>
    where T : ref class
    static String^ ToNonNullString(
    	T value
    )

JavaScript
View Source Request Example

    JavaScript does not support generic types or methods.

#### Parameters

value T
  Value to convert to string.

#### Type Parameters

T
  Type of Object to convert to string.

#### Return Value

String
value as a string; if value is null, empty string ("") will be returned.

#### Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

## See Also

#### Reference

StringExtensions Class
ToNonNullString Overload
Gemstone.StringExtensions Namespace