1. 程式人生 > >C#華氏溫度和攝氏溫度的相互專函源碼片段

C#華氏溫度和攝氏溫度的相互專函源碼片段

相互 stat emp system 資料 pub per ren str

把寫代碼過程經常用到的一些代碼做個記錄,如下資料是關於C#華氏溫度和攝氏溫度的相互專函片段的代碼。

public static double CelsiusToFahrenheit 
   (string temperatureCelsius)
{
   double celsius = System.Double.Parse (temperatureCelsius);
}

public static double FahrenheitToCelsius 
   (string temperatureFahrenheit)
{
   double fahrenheit = System.Double.Parse (temperatureFahrenheit);
}

C#華氏溫度和攝氏溫度的相互專函源碼片段