Skip to content

Pact Web Extensions SelectListItemExtensions WithDefault(System Collections Generic ICollection Microsoft AspNetCore Mvc Rendering SelectListItem string)

welshronaldo edited this page May 30, 2022 · 6 revisions

SelectListItemExtensions.WithDefault(ICollection<SelectListItem>, string) Method

Insert a default option with empty value at the start of the list

public static System.Collections.Generic.ICollection<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem> WithDefault(this System.Collections.Generic.ICollection<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem> @this, string description);

Parameters

this System.Collections.Generic.ICollection<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem>

description System.String

Returns

System.Collections.Generic.ICollection<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem>

Clone this wiki locally