Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# query string builder

using System.Linq;
using System.Web;
using System.Collections.Specialized;

private string ToQueryString(NameValueCollection nvc)
{
    var array = (
        from key in nvc.AllKeys
        from value in nvc.GetValues(key)
            select string.Format(
                "{0}={1}",
                HttpUtility.UrlEncode(key),
                HttpUtility.UrlEncode(value))
        ).ToArray();
    return "?" + string.Join("&", array);
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to download somthing from one drive unity 
Csharp :: unity collapse hierarchy script 
Csharp :: dictionaries in unity 
Csharp :: c# if string in licbox 
Csharp :: How to install a windows service programmatically in C#? 
Csharp :: c# on variable change property get set 
Csharp :: button event trigger wpf 
Csharp :: discord embeds how to separate inline fields 
Csharp :: C# How to display text in console 
Csharp :: c# mock ref parameter 
Csharp :: how to we put a link in button in a view in asp.net 
Csharp :: update a file where there is a keyword c# 
Csharp :: how to count letters in c# 
Csharp :: print text c# unity 
Csharp :: c# read huge file 
Csharp :: .net core get runtime version 
Csharp :: scaffold db 
Csharp :: escape chars for regex c# 
Csharp :: how to jump in unity using physics 
Csharp :: how to create class in c# 
Csharp :: c# comments 
Csharp :: c# C# read text from a certain line number from string 
Csharp :: ado stands for 
Csharp :: how to filter a list in c# 
Csharp :: entity 
Csharp :: exit form esc winforms 
Csharp :: mock async method c# reutrnd 
Csharp :: internal working of ioc container c# 
Csharp :: how to hide cell in epplus 
Csharp :: mesh decimate pyvista 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =