1 //------------------------------------------------------------------------------
2 // <copyright file="CodeMemberField.cs" company="Microsoft">
4 // <OWNER>Microsoft</OWNER>
5 // Copyright (c) Microsoft Corporation. All rights reserved.
7 //------------------------------------------------------------------------------
9 namespace System
.CodeDom
{
11 using System
.Diagnostics
;
13 using Microsoft
.Win32
;
14 using System
.Collections
;
15 using System
.Runtime
.InteropServices
;
19 /// Represents a class field member.
23 ClassInterface(ClassInterfaceType
.AutoDispatch
),
27 public class CodeMemberField
: CodeTypeMember
{
28 private CodeTypeReference type
;
29 private CodeExpression initExpression
;
33 /// Initializes a new <see cref='System.CodeDom.CodeMemberField'/>.
36 public CodeMemberField() {
41 /// Initializes a new <see cref='System.CodeDom.CodeMemberField'/> with the specified member field type and
45 public CodeMemberField(CodeTypeReference type
, string name
) {
51 /// <para>[To be supplied.]</para>
53 public CodeMemberField(string type
, string name
) {
54 Type
= new CodeTypeReference(type
);
59 /// <para>[To be supplied.]</para>
61 public CodeMemberField(Type type
, string name
) {
62 Type
= new CodeTypeReference(type
);
68 /// Gets or sets the member field type.
71 public CodeTypeReference Type
{
74 type
= new CodeTypeReference("");
85 /// Gets or sets the initialization expression for the member field.
88 public CodeExpression InitExpression
{
90 return initExpression
;
93 initExpression
= value;