Caprices

CodePrimitiveExpression

メンバ

コンストラクタ

public CodePrimitiveExpression();
概要
System.CodeDom.CodePrimitiveExpression クラスの新しいインスタンスを初期化します。
public CodePrimitiveExpression( object value );
概要
指定されたオブジェクトを使用して、 System.CodeDom.CodePrimitiveExpression クラスの新しいインスタンスを初期化します。
パラメーター
value
表すオブジェクト。

▲ページ先頭へ

プロパティ

public object Value{ get; set; }
概要
表すプリミティブ データ型を取得または設定します。
戻り値
プリミティブ データ型のインスタンスの値を表すためです。
UserData
現在のオブジェクトのユーザー定義可能なデータを取得します。 (Inherited from CodeObject )

▲ページ先頭へ

メソッド

Equals(Object)
指定したオブジェクトが、現在のオブジェクトと等しいかどうかを判断します。 (Inherited from Object)
GetHashCode()
既定のハッシュ関数として機能します。 (Inherited from Object)
GetType()
現在のインスタンスの Type を取得します。 (Inherited from Object)
MemberwiseClone()
現在の Object の簡易コピーを作成します。 (Inherited from Object)
ToString()
現在のオブジェクトを表す文字列を返します。 (Inherited from Object)

▲ページ先頭へ

次の例での使用CodePrimitiveExpressionいくつかのプリミティブ型の値を表します


// Represents a string.
// ストリングを表している。
CodePrimitiveExpression stringPrimitive = new CodePrimitiveExpression("Test String");
// Represents an integer.
// 整数を表している。
CodePrimitiveExpression intPrimitive = new CodePrimitiveExpression(10);
// Represents a floating point number.
// 浮動小数点数を表している。
CodePrimitiveExpression floatPrimitive = new CodePrimitiveExpression(1.03189);
// Represents a null value expression.
// 無効な価値表現を表している。
CodePrimitiveExpression nullPrimitive = new CodePrimitiveExpression(null);

▲ページ先頭へ

定義


[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Serializable]
public class CodePrimitiveExpression : System.CodeDom.CodeExpression

▲ページ先頭へ

クラス


#region アセンブリ System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// C:¥Program Files (x86)¥Reference Assemblies¥Microsoft¥Framework¥.NETFramework¥v4.6.1¥System.dll
#endregion

using System.Runtime.InteropServices;

namespace System.CodeDom
{
	//
	// 概要:
	//     プリミティブ データ型の値を表します。
	[ClassInterface( ClassInterfaceType.AutoDispatch )]
	[ComVisible( true )]
	public class CodePrimitiveExpression : CodeExpression
	{
		//
		// 概要:
		//     System.CodeDom.CodePrimitiveExpression クラスの新しいインスタンスを初期化します。
		public CodePrimitiveExpression();
		//
		// 概要:
		//     新しいインスタンスを初期化、 System.CodeDom.CodePrimitiveExpression クラスの指定したオブジェクトを使用します。
		//
		// パラメーター:
		//   value:
		//     表すオブジェクト。
		public CodePrimitiveExpression( object value );

		//
		// 概要:
		//     取得または設定を表すプリミティブ データ型。
		//
		// 戻り値:
		//     プリミティブ データ型のインスタンスの値を表すためです。
		public object Value
		{
			get;
			set;
		}
	}
}

▲ページ先頭へ