C#Console.WindowWidthプロパティ
WindowWidthプロパティは、コンソールウィンドウの幅を取得または設定します。
変数を宣言します。
int width;
次に、現在のウィンドウの幅を取得します。
width = Console.WindowWidth;
以下は完全な例です。
例
using System;
using System.Numerics;
using System.Globalization;
class Demo {
static void Main() {
int width;
int height;
width = Console.WindowWidth;
height = Console.WindowHeight;
Console.WriteLine("Current window width = "+width);
Console.WriteLine("Current window height = "+height);
}
} 出力
Current window width = 0 Current window height = 0
-
HTMLDOMビデオ幅プロパティ
HTML DOM Video widthプロパティは、メディアの幅(ピクセル単位)に対応する数値を返す/設定します。 構文 以下は構文です- 幅を返す 数値として(px) mediaObject.width 幅を数値(px)に設定 mediaObject.width = number 動画の幅の例を見てみましょう プロパティ- 例 <!DOCTYPE html> <html> <head> <title>HTML DOM Video width</title> <style> * { &n
-
C#のConsole.KeyAvailable()プロパティ
C#のConsole.KeyAvailable()プロパティは、入力ストリームでキーを押すことができるかどうかを示す値を取得するために使用されます。 構文 構文は次のとおりです- public static bool KeyAvailable { get; } 例 ここで、C#でConsole.KeyAvailable()プロパティを実装する例を見てみましょう- using System; using System.Threading; class Demo { public static void Main (string[] args) { &n