Unit.Percentage(Double) 方法

定義

從指定的雙精確度浮點數,建立 Unit 型別的 Percentage

public:
 static System::Web::UI::WebControls::Unit Percentage(double n);
public static System.Web.UI.WebControls.Unit Percentage (double n);
static member Percentage : double -> System.Web.UI.WebControls.Unit
Public Shared Function Percentage (n As Double) As Unit

參數

n
Double

雙精確度浮點數,表示 Unit 的長度。

傳回

Unit 型別的 Percentage,表示雙精確度浮點數指定的長度。

備註

Percentage使用靜態方法來建立 UnitPercentage 別的 ,代表 參數所 n 指定的長度。 例如,如果您為 n 指定 80,並使用傳回的單位來設定 Height Web 服務器控制項的 ,則 height 屬性會設定為 80%。

注意

類別 Unit 只能代表介於 -32768 和 32767 之間的值。

適用於

另請參閱