How to use Uri with hex characters in C#

3 Answers

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            bool b = Uri.IsHexDigit('F');

            Console.WriteLine(b);
        }
    }
}


/*
run:
 
True

*/

 



answered Mar 11, 2017 by avibootz
0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Uri.HexEscape(' ');

            Console.WriteLine(s);
        }
    }
}


/*
run:
 
%20

*/

 



answered Mar 11, 2017 by avibootz
0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = Uri.FromHex('F');

            Console.WriteLine(n);
        }
    }
}


/*
run:
 
15

*/

 



answered Mar 11, 2017 by avibootz

Related questions

2 answers 279 views
2 answers 283 views
1 answer 275 views
1 answer 243 views
1 answer 115 views
...