Generic method for strongly typed url FormatWith(String, Object) method usage.

Namespace: MonoSoftware.Web
Assembly: MonoSoftware.Web (in MonoSoftware.Web.dll) Version: 1.0.40.661 (1.0.40.661)

Syntax

C#
public static string FormatWith<T>(
	this string urlFormat,
	UrlParam<T> urlParam,
	T value
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function FormatWith(Of T) ( 
	urlFormat As String,
	urlParam As UrlParam(Of T),
	value As T
) As String
Visual C++
public:
[ExtensionAttribute]
generic<typename T>
static String^ FormatWith(
	String^ urlFormat, 
	UrlParam<T>^ urlParam, 
	T value
)
F#
static member FormatWith : 
        urlFormat : string * 
        urlParam : UrlParam<'T> * 
        value : 'T -> string 

Parameters

urlFormat
Type: System..::..String
Url format string
urlParam
Type: MonoSoftware.Web..::..UrlParam<(Of <(<'T>)>)>
Url parameter
value
Type: T
Url parameter's value

Type Parameters

T
Type of UrlParam

Return Value

Type: String
A string formatted with url parameter and its value.

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).

Remarks

If param is already present in the url, it's overriden with the new value.

See Also