Encoding.IsBrowserDisplay プロパティ
ブラウザ クライアントが、表示にこのエンコーディングを使用できるかどうかを示す値を取得します。
Public Overridable ReadOnly Property IsBrowserDisplay As Boolean
[C#]
public virtual bool IsBrowserDisplay {get;}
[C++]
public: __property virtual bool get_IsBrowserDisplay();
[JScript]
public function get IsBrowserDisplay() : Boolean;
プロパティ値
表示にこのエンコーディングを使用できる場合は true 。それ以外の場合は false 。
解説
たとえば、このプロパティは、コード ページ 1252 (Windows-1252) に対しては true を返しますが、コード ページ 437 (IBM-437) に対しては false を返します。
使用例
Imports System
Imports System.Text
Namespace IsPropertyExamples
Class Class1
Shared Sub Main()
' Create a very basic encoding and display its properties.
' Use the IBM-437 encoding.
Dim myEncoding437 As Encoding = Encoding.GetEncoding(437)
ShowBrowserAndMailProperties(myEncoding437)
Console.WriteLine()
' Create a well-known encoding and display its properties.
' Use the Windows-1252 encoding.
Dim myEncoding1252 As Encoding = Encoding.GetEncoding(1252)
ShowBrowserAndMailProperties(myEncoding1252)
End Sub
Private Shared Sub ShowBrowserAndMailProperties(ByVal myEncoding As Encoding)
' Display the properties to the console.
Console.WriteLine("Encoding name: {0}", myEncoding.EncodingName)
Console.WriteLine("IsBrowserDisplay: {0}", myEncoding.IsBrowserDisplay)
Console.WriteLine("IsBrowserSave: {0}", myEncoding.IsBrowserSave)
Console.WriteLine("IsMailNewsDisplay: {0}", myEncoding.IsMailNewsDisplay)
Console.WriteLine("IsMailNewsSave: {0}", myEncoding.IsMailNewsSave)
End Sub
End Class
End Namespace
[C#]
using System;
using System.Text;
namespace IsPropertyExamples
{
class Class1
{
static void Main()
{
// Create a basic encoding and display its properties.
// Use the IBM-437 encoding.
Encoding myEncoding437 = Encoding.GetEncoding(437);
ShowBrowserAndMailProperties(myEncoding437);
Console.WriteLine();
// Create a well-known encoding and display its properties.
// Use the Windows-1252 encoding.
Encoding myEncoding1252 = Encoding.GetEncoding(1252);
ShowBrowserAndMailProperties(myEncoding1252);
}
private static void ShowBrowserAndMailProperties(Encoding myEncoding)
{
// Display the properties to the console.
Console.WriteLine("Encoding name: {0}", myEncoding.EncodingName);
Console.WriteLine("IsBrowserDisplay: {0}", myEncoding.IsBrowserDisplay);
Console.WriteLine("IsBrowserSave: {0}", myEncoding.IsBrowserSave);
Console.WriteLine("IsMailNewsDisplay: {0}", myEncoding.IsMailNewsDisplay);
Console.WriteLine("IsMailNewsSave: {0}", myEncoding.IsMailNewsSave);
}
}
}
[C++]
#using <mscorlib.dll>
using namespace System;
using namespace System::Text;
static void ShowBrowserAndMailProperties(Encoding * myEncoding)
{
// Display the properties to the console.
Console::WriteLine(S"Encoding name: {0}", myEncoding -> EncodingName);
Console::WriteLine(S"IsBrowserDisplay: {0}", __box(myEncoding -> IsBrowserDisplay));
Console::WriteLine(S"IsBrowserSave: {0}", __box(myEncoding -> IsBrowserSave));
Console::WriteLine(S"IsMailNewsDisplay: {0}", __box(myEncoding -> IsMailNewsDisplay));
Console::WriteLine(S"IsMailNewsSave: {0}", __box(myEncoding -> IsMailNewsSave));
}
int main()
{
// Create a very basic encoding and display its properties.
// Use the IBM-437 encoding.
Encoding * myEncoding437 = Encoding::GetEncoding(437);
ShowBrowserAndMailProperties(myEncoding437);
Console::WriteLine();
// Create a well-known encoding and display its properties.
// Use the Windows-1252 encoding.
Encoding * myEncoding1252 = Encoding::GetEncoding(1252);
ShowBrowserAndMailProperties(myEncoding1252);
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ