Click or drag to resize

StringExtensionsCapitalizeSentence Method (String, CultureInfo)

Capitalizes the first letter of a sentence assuming that words are separated by a single space.

Namespace:  Enkoni.Framework
Assembly:  Enkoni.Framework (in Enkoni.Framework.dll) Version: 1.3.0.1
Syntax
public static string CapitalizeSentence(
	this string source,
	CultureInfo culture
)

Parameters

source
Type: SystemString
The sentence that must be capitalized.
culture
Type: System.GlobalizationCultureInfo
A CultureInfo object that supplies culture-specific casing rules.

Return Value

Type: String
The capitalized sentence. If source is empty, source is returned without modifications.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. 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