StringExtensionsTagSet Method |
Returns the string updated to include the specified name/value pair.
If there is already an item with the specified name then its value is updated,
else a new item is added.
In the tag string name and value are separated by an equals sign ("=")
and name/value pairs are separated by ampersands. Internally each
value is UriEncoded to allow for values having ampersands or equals
sign. The UriEncoding is performed by this method.
Use
TagGet(String, String) to retrieve a value by name.
Namespace:
NetQuarry
Assembly:
EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax public static string TagSet(
this string s,
string name,
string val
)
<ExtensionAttribute>
Public Shared Function TagSet (
s As String,
name As String,
val As String
) As String
Parameters
- s
- Type: SystemString
The original tag string. - name
- Type: SystemString
The name of the item to set. - val
- Type: SystemString
The value of the item.
Return Value
Type:
StringThe tag string including the specified name and 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).
See Also