String.op_Equality メソッド
アセンブリ: mscorlib (mscorlib.dll 内)

Dim a As String Dim b As String Dim returnValue As Boolean returnValue = (a = b)
- a
String または null 参照 (Visual Basic では Nothing)。
- b
String または null 参照 (Visual Basic では Nothing)。
a の値が b の値と同じ場合は true。それ以外の場合は false。


' Example for the String Equality operator. Imports System Imports Microsoft.VisualBasic Module EqualityOp Sub Main() Console.WriteLine( _ "This example of the String Equality operator " & vbCrLf & _ "generates the following output." & vbCrLf) CompareAndDisplay("ijkl") CompareAndDisplay("ABCD") CompareAndDisplay("abcd") End Sub 'Main Sub CompareAndDisplay(Comparand As String) Dim Lower As String = "abcd" Console.WriteLine( _ """{0}"" = ""{1}"" ? {2}", _ Lower, Comparand, Lower = Comparand) End Sub 'CompareAndDisplay End Module 'EqualityOp ' This example of the String Equality operator ' generates the following output. ' ' "abcd" = "ijkl" ? False ' "abcd" = "ABCD" ? False ' "abcd" = "abcd" ? True
// Example for the String Equality operator. using System; class EqualityOp { public static void Main() { Console.WriteLine( "This example of the String Equality operator\n" + "generates the following output.\n" ); CompareAndDisplay( "ijkl" ); CompareAndDisplay( "ABCD" ); CompareAndDisplay( "abcd" ); } static void CompareAndDisplay( string Comparand ) { String Lower = "abcd"; Console.WriteLine( "\"{0}\" == \"{1}\" ? {2}", Lower, Comparand, Lower == Comparand ); } } /* This example of the String Equality operator generates the following output. "abcd" == "ijkl" ? False "abcd" == "ABCD" ? False "abcd" == "abcd" ? True */
// Example for the String Equality operator. using namespace System; void CompareAndDisplay( String^ Comparand ) { String^ Lower = "abcd"; Console::WriteLine( "\"{0}\" == \"{1}\" ? {2}", Lower, Comparand, Lower == Comparand ); } int main() { Console::WriteLine( "This example of the String Equality operator\n" "generates the following output.\n" ); CompareAndDisplay( "ijkl" ); CompareAndDisplay( "ABCD" ); CompareAndDisplay( "abcd" ); } /* This example of the String Equality operator generates the following output. "abcd" == "ijkl" ? False "abcd" == "ABCD" ? False "abcd" == "abcd" ? True */
// Example for the String Equality operator. import System.*; class EqualityOp { public static void main(String[] args) { Console.WriteLine(("This example of the String Equality operator\n" + "generates the following output.\n")); CompareAndDisplay("ijkl"); CompareAndDisplay("ABCD"); CompareAndDisplay("abcd"); } //main static void CompareAndDisplay(String comparand) { String lower = "abcd"; Console.WriteLine("\"{0}\" == \"{1}\" ? {2}", lower, comparand, System.Convert.ToString(lower.equals(comparand))); } //CompareAndDisplay } //EqualityOp /* This example of the String Equality operator generates the following output. "abcd" == "ijkl" ? False "abcd" == "ABCD" ? False "abcd" == "abcd" ? True */

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からString.op_Equality メソッドを検索する場合は、下記のリンクをクリックしてください。

- String.op_Equality メソッドのページへのリンク