197 instantiations of OptionalField
mscorlib (135)
system\AppDomainSetup.cs (13)
83
[
OptionalField
(VersionAdded = 2)]
85
[
OptionalField
(VersionAdded = 2)]
88
[
OptionalField
(VersionAdded = 2)]
95
[
OptionalField
(VersionAdded = 2)]
97
[
OptionalField
(VersionAdded = 2)]
100
[
OptionalField
(VersionAdded = 3)]
103
[
OptionalField
(VersionAdded = 4)]
105
[
OptionalField
(VersionAdded = 4)]
109
[
OptionalField
(VersionAdded = 4)]
115
[
OptionalField
(VersionAdded = 4)]
118
[
OptionalField
(VersionAdded = 5)] // This was added in .NET FX v4.5
126
[
OptionalField
(VersionAdded = 5)] // This was added in .NET FX v4.5
130
[
OptionalField
(VersionAdded = 5)] // This was added in .NET FX v4.5
system\Collections\Concurrent\ConcurrentDictionary.cs (1)
102
[
OptionalField
]
system\diagnostics\stackframe.cs (1)
34
[System.Runtime.Serialization.
OptionalField
]
system\diagnostics\stacktrace.cs (1)
53
[
OptionalField
]
system\exception.cs (4)
715
[
OptionalField
]
862
[
OptionalField
] // This isnt present in pre-V4 exception objects that would be serialized.
897
[
OptionalField
]
901
[
OptionalField
(VersionAdded = 4)]
system\globalization\calendar.cs (1)
96
[System.Runtime.Serialization.
OptionalField
(VersionAdded = 2)]
system\globalization\compareinfo.cs (3)
100
[
OptionalField
(VersionAdded = 2)]
256
[
OptionalField
(VersionAdded = 1)]
1317
[
OptionalField
(VersionAdded = 3)]
system\globalization\cultureinfo.cs (2)
80
[
OptionalField
(VersionAdded = 1)]
82
[
OptionalField
(VersionAdded = 1)]
system\globalization\datetimeformatinfo.cs (20)
77
[
OptionalField
(VersionAdded = 2)]
97
[
OptionalField
(VersionAdded = 1)]
99
[
OptionalField
(VersionAdded = 1)]
101
[
OptionalField
(VersionAdded = 1)]
103
[
OptionalField
(VersionAdded = 1)]
106
[
OptionalField
(VersionAdded = 2)] // added in .NET Framework Release {2.0SP1/3.0SP1/3.5RTM}
126
[
OptionalField
(VersionAdded = 1)]
131
[
OptionalField
(VersionAdded = 2)]
138
[
OptionalField
(VersionAdded = 2)]
142
[
OptionalField
(VersionAdded = 2)]
146
[
OptionalField
(VersionAdded = 2)]
165
[
OptionalField
(VersionAdded = 3)]
186
[
OptionalField
(VersionAdded = 2)]
396
[
OptionalField
(VersionAdded = 1)]
398
[
OptionalField
(VersionAdded = 1)]
401
[
OptionalField
(VersionAdded = 1)]
403
[
OptionalField
(VersionAdded = 1)]
405
[
OptionalField
(VersionAdded = 2)]
407
[
OptionalField
(VersionAdded = 2)]
413
[
OptionalField
(VersionAdded = 1)]
system\globalization\gregoriancalendarhelper.cs (8)
28
[
OptionalField
(VersionAdded = 4)]
30
[
OptionalField
(VersionAdded = 4)]
32
[
OptionalField
(VersionAdded = 4)]
117
[
OptionalField
(VersionAdded = 1)]
119
[
OptionalField
(VersionAdded = 1)]
124
[
OptionalField
(VersionAdded = 1)]
126
[
OptionalField
(VersionAdded = 1)]
131
[
OptionalField
(VersionAdded = 1)]
system\globalization\numberformatinfo.cs (7)
78
[
OptionalField
(VersionAdded = 2)]
84
[
OptionalField
(VersionAdded = 1)]
97
[
OptionalField
(VersionAdded = 2)]
104
[
OptionalField
(VersionAdded = 1)]
108
[
OptionalField
(VersionAdded = 2)]
119
[
OptionalField
(VersionAdded = 1)]
121
[
OptionalField
(VersionAdded = 1)]
system\globalization\regioninfo.cs (2)
163
[
OptionalField
(VersionAdded = 2)]
167
[
OptionalField
(VersionAdded = 2)]
system\globalization\sortkey.cs (2)
36
[
OptionalField
(VersionAdded = 3)]
39
[
OptionalField
(VersionAdded = 1)] // LCID field so serialization is Whidbey compatible though we don't officially support it
system\globalization\stringinfo.cs (1)
31
[
OptionalField
(VersionAdded = 2)]
system\globalization\textelementenumerator.cs (2)
41
[
OptionalField
(VersionAdded = 2)]
44
[
OptionalField
(VersionAdded = 2)]
system\globalization\textinfo.cs (7)
52
[
OptionalField
(VersionAdded = 2)]
55
[
OptionalField
(VersionAdded = 2)]
78
[
OptionalField
(VersionAdded = 3)]
130
[
OptionalField
(VersionAdded = 2)]
136
[
OptionalField
(VersionAdded = 1)]
138
[
OptionalField
(VersionAdded = 1)]
140
[
OptionalField
(VersionAdded = 1)]
system\io\binarywriter.cs (2)
40
[
OptionalField
] // New in .NET FX 4.5. False is the right default value.
47
[
OptionalField
]
system\reflection\parameterinfo.cs (3)
44
[
OptionalField
]
46
[
OptionalField
]
48
[
OptionalField
]
system\resources\resourcemanager.cs (6)
206
[
OptionalField
(VersionAdded = 1)]
218
[
OptionalField
]
221
[
OptionalField
]
223
[
OptionalField
]
227
[
OptionalField
(VersionAdded = 1)]
231
[
OptionalField
(VersionAdded = 4)]
system\security\claims\ClaimsIdentity.cs (8)
98
[
OptionalField
(VersionAdded=2)]
101
[
OptionalField
(VersionAdded = 2)]
104
[
OptionalField
(VersionAdded = 2)]
107
[
OptionalField
(VersionAdded = 2)]
110
[
OptionalField
(VersionAdded = 2)]
113
[
OptionalField
(VersionAdded = 2)]
116
[
OptionalField
(VersionAdded = 2)]
119
[
OptionalField
(VersionAdded = 2)]
system\security\claims\ClaimsPrincipal.cs (2)
55
[
OptionalField
(VersionAdded = 2)]
57
[
OptionalField
(VersionAdded = 2)]
system\security\namedpermissionset.cs (1)
48
[
OptionalField
(VersionAdded = 2)]
system\security\permissions\fileiopermission.cs (2)
48
[
OptionalField
(VersionAdded = 2)]
50
[
OptionalField
(VersionAdded = 2)]
system\security\permissions\permissionattributes.cs (2)
243
[
OptionalField
(VersionAdded = 2)] private FileIOPermissionAccess m_allLocalFiles = FileIOPermissionAccess.NoAccess;
244
[
OptionalField
(VersionAdded = 2)] private FileIOPermissionAccess m_allFiles = FileIOPermissionAccess.NoAccess;
system\security\permissions\registrypermission.cs (2)
42
[
OptionalField
(VersionAdded = 2)]
44
[
OptionalField
(VersionAdded = 2)]
system\security\permissions\siteidentitypermission.cs (3)
33
[
OptionalField
(VersionAdded = 2)]
35
[
OptionalField
(VersionAdded = 2)]
40
[
OptionalField
(VersionAdded = 2)]
system\security\permissions\urlidentitypermission.cs (3)
35
[
OptionalField
(VersionAdded = 2)]
37
[
OptionalField
(VersionAdded = 2)]
42
[
OptionalField
(VersionAdded = 2)]
system\security\permissions\zoneidentitypermission.cs (2)
43
[
OptionalField
(VersionAdded = 2)]
48
[
OptionalField
(VersionAdded = 2)]
system\security\permissionset.cs (5)
84
[
OptionalField
(VersionAdded = 2)]
87
[
OptionalField
(VersionAdded = 2)]
94
[
OptionalField
(VersionAdded = 2)]
98
[
OptionalField
(VersionAdded = 2)]
114
[
OptionalField
(VersionAdded = 2)]
system\security\policy\evidence.cs (2)
57
[
OptionalField
(VersionAdded = 4)]
60
[
OptionalField
(VersionAdded = 4)]
system\security\policy\netcodegroup.cs (2)
244
[
OptionalField
(VersionAdded = 2)]
246
[
OptionalField
(VersionAdded = 2)]
system\security\policy\policylevel.cs (1)
51
[
OptionalField
(VersionAdded = 2)]
system\security\policy\zone.cs (1)
29
[
OptionalField
(VersionAdded = 2)]
system\security\util\tokenbasedset.cs (2)
36
[
OptionalField
(VersionAdded = 2)]
38
[
OptionalField
(VersionAdded = 2)]
system\security\util\urlstring.cs (5)
31
[
OptionalField
(VersionAdded = 2)]
40
[
OptionalField
(VersionAdded = 2)]
42
[
OptionalField
(VersionAdded = 2)]
44
[
OptionalField
(VersionAdded = 2)]
47
[
OptionalField
(VersionAdded = 3)]
system\stringcomparer.cs (1)
138
[
OptionalField
] private CompareOptions _options;
system\text\encoding.cs (3)
192
[
OptionalField
(VersionAdded = 2)]
196
[
OptionalField
(VersionAdded = 2)]
198
[
OptionalField
(VersionAdded = 2)]
system\text\unicodeencoding.cs (1)
23
[
OptionalField
(VersionAdded = 2)]
system\text\utf7encoding.cs (1)
46
[
OptionalField
(VersionAdded = 2)]
System (26)
compmod\system\codedom\CodeAttributeDeclaration.cs (1)
31
[
OptionalField
]
compmod\system\codedom\CodeCompileUnit.cs (2)
36
[
OptionalField
]
38
[
OptionalField
]
compmod\system\codedom\CodeMemberMethod.cs (1)
36
[
OptionalField
]
compmod\system\codedom\codemethodreferenceexpression.cs (1)
32
[
OptionalField
]
compmod\system\codedom\CodeStatement.cs (2)
32
[
OptionalField
]
34
[
OptionalField
]
compmod\system\codedom\CodeTypeDeclaration.cs (2)
44
[
OptionalField
]
46
[
OptionalField
]
compmod\system\codedom\CodeTypeMember.cs (2)
37
[
OptionalField
]
39
[
OptionalField
]
compmod\system\codedom\CodeTypeReference.cs (4)
41
[
OptionalField
]
45
[
OptionalField
]
47
[
OptionalField
]
49
[
OptionalField
]
compmod\system\codedom\compiler\CompilerParameters.cs (3)
32
[
OptionalField
]
37
[
OptionalField
]
39
[
OptionalField
]
net\System\Net\cookie.cs (1)
76
[System.Runtime.Serialization.
OptionalField
]
net\System\Net\cookiecollection.cs (1)
38
[
OptionalField
]
net\System\Net\Sockets\SocketInformation.cs (1)
10
[
OptionalField
]
net\System\Net\WebPermission.cs (2)
240
[
OptionalField
] private bool m_UnrestrictedConnect;
241
[
OptionalField
] private bool m_UnrestrictedAccept;
regex\system\text\regularexpressions\Regex.cs (1)
88
[
OptionalField
(VersionAdded = 2)]
regex\system\text\regularexpressions\RegexCompilationInfo.cs (1)
28
[
OptionalField
(VersionAdded = 2)]
regex\system\text\regularexpressions\RegexGroup.cs (1)
32
[
OptionalField
]
System.Core (1)
System\Security\Cryptography\ECDiffieHellmanCngPublicKey.cs (1)
22
[
OptionalField
] private string m_curveName;
System.Data (4)
fx\src\data\System\Data\Common\NameValuePair.cs (1)
20
[
OptionalField
(VersionAdded=2)]
fx\src\data\System\Data\SqlClient\SqlError.cs (2)
24
[System.Runtime.Serialization.
OptionalFieldAttribute
(VersionAdded=2)]
29
[System.Runtime.Serialization.
OptionalFieldAttribute
(VersionAdded=4)]
fx\src\data\System\Data\SqlClient\SqlException.cs (1)
26
[System.Runtime.Serialization.
OptionalFieldAttribute
(VersionAdded = 4)]
System.Drawing (4)
commonui\System\Drawing\Printing\Margins.cs (4)
35
[
OptionalField
]
37
[
OptionalField
]
39
[
OptionalField
]
41
[
OptionalField
]
System.Web (2)
Security\FormsAuthenticationTicket.cs (2)
153
[
OptionalField
(VersionAdded = 2)]
155
[
OptionalField
(VersionAdded = 2)]
System.Windows.Forms (3)
winforms\Managed\System\Resources\ResXFileRef.cs (1)
46
[
OptionalField
(VersionAdded = 2)]
winforms\Managed\System\WinForms\ListViewItem.cs (2)
1426
[
OptionalField
(VersionAdded=2)]
1431
[
OptionalField
(VersionAdded=2)]
System.Workflow.ComponentModel (21)
AuthoringOM\Compiler\XomlCompilerParameters.cs (1)
317
[
OptionalField
(VersionAdded = 2)]
AuthoringOM\Serializer\ActivitySurrogate.cs (10)
157
[
OptionalField
]
176
[
OptionalField
]
179
[
OptionalField
]
182
[
OptionalField
]
185
[
OptionalField
]
188
[
OptionalField
]
191
[
OptionalField
]
194
[
OptionalField
]
197
[
OptionalField
]
200
[
OptionalField
]
AuthoringOM\Serializer\DictionarySurrogate.cs (4)
59
[
OptionalField
]
61
[
OptionalField
]
63
[
OptionalField
]
65
[
OptionalField
]
AuthoringOM\Serializer\GenericQueueSurrogate.cs (2)
42
[
OptionalField
]
44
[
OptionalField
]
AuthoringOM\Serializer\ListSurrogate.cs (2)
43
[
OptionalField
]
45
[
OptionalField
]
AuthoringOM\Serializer\QueueSurrogate.cs (2)
35
[
OptionalField
]
37
[
OptionalField
]
System.Xml (1)
System\Xml\XmlException.cs (1)
35
[
OptionalField
]
5 references to OptionalField
mscorlib (4)
system\runtime\serialization\formatters\binary\binaryobjectinfo.cs (2)
856
Object [] attrs = cache.memberInfos[i].GetCustomAttributes(typeof(
OptionalFieldAttribute
), false);
859
throw new SerializationException(Environment.GetResourceString("Serialization_MissingMember", cache.memberNames[i], objectType, typeof(
OptionalFieldAttribute
).FullName));
system\runtime\serialization\objectclonehelper.cs (2)
158
Object [] attrs = mi[index].GetCustomAttributes(typeof(
OptionalFieldAttribute
), false);
163
typeof(
OptionalFieldAttribute
).FullName));
System.Runtime.Serialization (1)
System\Runtime\Serialization\Globals.cs (1)
440
typeOfOptionalFieldAttribute = typeof(
OptionalFieldAttribute
);