c# uri.host_C#| Uri.FromHex()方法與示例

c# uri.host

Uri.FromHex()方法 (Uri.FromHex() Method)

Uri.FromHex() method is a static method that returns an integer that represents a decimal digit of specified hex char.

Uri.FromHex()方法是一個靜態方法,該方法返回一個整數,該整數表示指定的十六進制字符的十進制數字。

Syntax:

句法:

    int Uri.FromHex (char ch);

Parameter(s):

參數:

  • char ch – represents the specified hex char.

    char ch –表示指定的十六進制字符。

Return value:

返回值:

The return type of this method is int, it returns an integer that represents a decimal digit of specified hex char.

此方法的返回類型為int ,它返回一個整數,該整數表示指定的十六進制char的十進制數字。

Example to demonstrate example of Uri.FromHex() method

演示Uri.FromHex()方法示例的示例

using System;
class UriExample
{
//Entry point of Program
static public void Main()
{
char ch1 = 'e';
char ch2 = 'g';
int decimalDigit = 0;
if (Uri.IsHexDigit(ch1))
{
decimalDigit = Uri.FromHex(ch1);
Console.WriteLine("Hex Digit: {0}, decimal digit: {1}",ch1,decimalDigit);
}
else
Console.WriteLine("It is not hex digit");
if (Uri.IsHexDigit(ch2))
{
decimalDigit = Uri.FromHex(ch2);
Console.WriteLine("Hex Digit : {0}, decimal digit: {1}", ch2, decimalDigit);
}
else
Console.WriteLine("It is not hex digit");
}
}

Output

輸出量

Hex Digit: e, decimal digit: 14
It is not hex digit

翻譯自: https://www.includehelp.com/dot-net/uri-fromhex-method-with-example.aspx

c# uri.host

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/541037.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/541037.shtml
英文地址,請注明出處:http://en.pswp.cn/news/541037.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

中國制造2025變革,背后的大數據來龍去脈

大數據的成長路徑一定是個長期成長過程,實用分析工具與先進分析理念,真正釋放數字化分析的力量,由人類軌跡產生的數據,與機器自動產生的數據得出洞見,從管理決策推導運營方案,最終實現數據價值提升。無論是…

java 文件下載 jsp文件_jsp文件 Java實現文件上傳與下載

通過前臺選擇文件,然后將資源上傳到(即新建一個文件)到發布的資源文件下面,下載就是url 到發布的資源文件,觸發即可自動下載。服務器已經封裝了如何下載的底層實現。(此處用的是tomcat)JSP上傳文件方法:關于在HTTP request 中通過…

ruby hash方法_Ruby中帶有示例的Hash.flatten方法

ruby hash方法哈希平化方法 (Hash.flatten Method) In this article, we will study about Hash.flatten Method. The working of this method can be predicted with the help of its name but it is not as simple as it seems. Well, we will understand this method with t…

浙江嘉興“網事”再添國字招牌 領跑城市智慧轉型

16日,舉世矚目的第三屆世界互聯網大會如期而至。世界目光再次聚焦“烏鎮時間”,人們不禁發現,流淌千年的水網已與迅猛發展的互聯網交相輝映,1300多年的古鎮釋放出強烈的互聯網信號。更令人驚喜的是,互聯網形成的沖擊波…

java list過濾重復的數據_List 去除重復數據的 5 種正確姿勢!

以下介紹五種-不同的方法去除 Java 中ArrayList中的重復數據1.使用LinkedHashSet刪除arraylist中的重復數據LinkedHashSet是在一個ArrayList刪除重復數據的最佳方法。LinkedHashSet在內部完成兩件事:刪除重復數據保持添加到其中的數據的順序Java示例使用LinkedHashS…

打擊侵犯公民個人信息罪的司法困境

當前,公民個人信息泄露并屢遭侵犯已成為社會關注焦點。泄露的信息輕則給被害人生活造成困擾,重則使被害人陷入電信詐騙、敲詐勒索等犯罪漩渦,造成重大人身、財產損失。一些民眾認為,對侵犯公民個人信息行為的刑事打擊很不給力&…

ruby中、.reject_Ruby中帶有示例的Array.reject方法

ruby中、.rejectRuby Array.reject方法 (Ruby Array.reject Method) In the last article, we have seen how we can make use of the Array.select method in order to print the Array elements based on certain conditions provided inside the block? In this article, w…

java獲取主機mac_Java 如何獲取主機的MAC地址

獲取MAC地址首先要理解當前的操作系統,由于在不同的操作系統中CMD命令所在的位置不同,因此首先使用System類中的getProperty("os.name")方法獲取當前的操作系統,getProperty()方法可以確定當前系統屬性,它的參數是一些固…

微軟免費軟件項目DreamSpark更名為Microsoft Imagine

9月10日消息,微軟免費軟件項目DreamSpark近日正式更名為Microsoft Imagine,將與一年一度的微軟“創新杯(Imagine Cup)”齊名。微軟免費軟件項目DreamSpark更名為Microsoft Imagine  2008年2月19日,微軟公司董事長比爾蓋茨在斯坦福大學發布了…

java jpa_Java JPA 語法知識

前提操作創建一個可持久化的實體類dao層繼承JpaRepositoryT:實體類ID:實體類的主鍵類型例:public interface SysUserRespository extends JpaRepository {}JPA中支持的關鍵詞And --- 等價于 SQL 中的 and 關鍵字,比如 findByUsern…

array.slice_Ruby中帶有示例的Array.slice()方法

array.sliceArray.slice()方法 (Array.slice() Method) In this article, we will study about Array.slice() method. You all must be thinking the method must be doing something which is related to the slicing of elements or objects in the Array instance. It is n…

阿特斯攜手EDF啟動建設巴西191.5MW光伏項目

2016年10月11日,阿特斯太陽能(安大略省,圭爾夫)和EDF Energies Nouvelles(法國,巴黎)共同宣布,將阿特斯巴西Pirapora I太陽能項目80%的股權出售給EDF的巴西本地子公司EDF…

apachejmeter_java源碼_自定義編寫jmeter的Java測試代碼

我們在做性能測試時,有時需要自己編寫測試腳本,很多測試工具都支持自定義編寫測試腳本,比如LoadRunner就有很多自定義腳本的協議,比如"C Vuser","JavaVuser"等協議.同樣,Jmeter也支持自定義編寫的測試代碼,不過與LoadRunner不同的是,Jmeter沒有自帶編譯器,…

julia fit 函數_帶有Julia中示例的flipsign()函數

julia fit 函數Julia| flipsign()函數 (Julia | flipsign() function) flipsign() function is a library function in Julia programming language, it accepts two values as parameters and returns a value with the magnitude of first value and sign of the first value…

優化Android應用內存的若干方法

https://my.oschina.net/chaselinfo/blog/198172摘要: 在app開發的各個階段中要考慮RAM的限制問題, 包括在設計階段(正式開發之前). 使用下面的不同的方法可以達到很好的效果. 當您在設計和開發Android應用時用下面的方法可以使內存運用最高效.使用保守的Service 如果你的應用需…

一? ilkkn.n_IL&FS的完整形式是什么?

一? il&kkn.nIL&FS:基礎設施租賃和金融服務 (IL& FS: Infrastructure Leasing & Financial Services) IL&FS is an abbreviation of Infrastructure Leasing & Financial Services. It is the largest infrastructure development …

java notify喚醒原理_Java wait和notify虛假喚醒原理

自己在此記錄一下,方便日后復習。虛假喚醒的概念jdk官方文檔解釋:所以說在wait和notify一塊使用時,如果使用if作為條件時,會有虛假喚醒的情況發生,所以必須使用while作為循環條件。下面來舉例實驗:首先&…

C#里面的三種定時計時器:Timer

在.NET中有三種計時器:1、System.Windows.Forms命名空間下的Timer控件,它直接繼承自Componet。Timer控件只有綁定了Tick事件和設置EnabledTrue后才會自動計時,停止計時可以用Stop()方法控制,通過Stop()停止之后,如果想…

wireshark rto_RTO的完整形式是什么?

wireshark rtoRTO:地區運輸辦公室/公路運輸辦公室 (RTO: Regional Transport Office/ Road Transport Office) RTO is an abbreviation of the Regional Transport Office. It is an Indian Government departmental organization that is responsible for upholdin…

java8 json轉xml_2019-08-17java對象與json,xml互轉

依賴的jar包,jackson-all-1.7.6.jar,xstream-1.4.4.jar下載地址:鏈接:https://pan.baidu.com/s/1LflD135qlQiIPGXw5XwDmw提取碼:6v29復制這段內容后打開百度網盤手機App,操作更方便哦package json_xml;import com.thoughtworks.xs…