-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathFieldBuilder.xml
More file actions
990 lines (941 loc) · 55.9 KB
/
Copy pathFieldBuilder.xml
File metadata and controls
990 lines (941 loc) · 55.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
<Type Name="FieldBuilder" FullName="System.Reflection.Emit.FieldBuilder">
<TypeSignature Language="C#" Value="public abstract class FieldBuilder : System.Reflection.FieldInfo" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit FieldBuilder extends System.Reflection.FieldInfo" />
<TypeSignature Language="DocId" Value="T:System.Reflection.Emit.FieldBuilder" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class FieldBuilder
Inherits FieldInfo" />
<TypeSignature Language="F#" Value="type FieldBuilder = class
 inherit FieldInfo" />
<TypeSignature Language="C++ CLI" Value="public ref class FieldBuilder abstract : System::Reflection::FieldInfo" />
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Reflection.Emit" ToVersion="10.0.0.0" FrameworkAlternate="net-10.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Reflection.Emit" ToVersion="11.0.0.0" FrameworkAlternate="net-11.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Reflection.Emit" ToVersion="8.0.0.0" FrameworkAlternate="net-8.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Reflection.Emit" ToVersion="9.0.0.0" FrameworkAlternate="net-9.0" />
</TypeForwardingChain>
<Base>
<BaseTypeName>System.Reflection.FieldInfo</BaseTypeName>
</Base>
<Interfaces>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(0)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(0)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Defines and represents a field. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Get an instance of `FieldBuilder` by calling <xref:System.Reflection.Emit.TypeBuilder.DefineField*>, <xref:System.Reflection.Emit.ModuleBuilder.DefineInitializedData*>, or <xref:System.Reflection.Emit.ModuleBuilder.DefineUninitializedData*>.
> [!NOTE]
> The <xref:System.Reflection.Emit.FieldBuilder.SetValue*> method is currently not supported. As a workaround, retrieve the <xref:System.Reflection.FieldInfo> by reflecting on the finished type and call <xref:System.Reflection.FieldInfo.SetValue*> to set the value of the field.
## Examples
The following example illustrates the use of the `FieldBuilder` class.
:::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/FieldBuilder/Overview/FieldBuilder.cs":::
:::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/FieldBuilder/Overview/FieldBuilder.vb":::
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected FieldBuilder ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Reflection.Emit.FieldBuilder.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberSignature Language="C++ CLI" Value="protected:
 FieldBuilder();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Reflection.Emit.FieldBuilder" /> class.</summary>
<remarks>This constructor is invoked by derived classes.</remarks>
</Docs>
</Member>
<Member MemberName="Attributes">
<MemberSignature Language="C#" Value="public override System.Reflection.FieldAttributes Attributes { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Reflection.FieldAttributes Attributes" />
<MemberSignature Language="DocId" Value="P:System.Reflection.Emit.FieldBuilder.Attributes" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property Attributes As FieldAttributes" />
<MemberSignature Language="F#" Value="member this.Attributes : System.Reflection.FieldAttributes" Usage="System.Reflection.Emit.FieldBuilder.Attributes" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Reflection::FieldAttributes Attributes { System::Reflection::FieldAttributes get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Reflection.FieldAttributes</ReturnType>
</ReturnValue>
<Docs>
<summary>Indicates the attributes of this field. This property is read-only.</summary>
<value>The attributes of this field.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The following code sample illustrates the use of `Attributes`.
:::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/FieldBuilder/Attributes/fieldbuilder_reflectedtype.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/FieldBuilder/Attributes/fieldbuilder_reflectedtype.vb" id="Snippet1":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="DeclaringType">
<MemberSignature Language="C#" Value="public override Type? DeclaringType { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Type DeclaringType" />
<MemberSignature Language="DocId" Value="P:System.Reflection.Emit.FieldBuilder.DeclaringType" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property DeclaringType As Type" />
<MemberSignature Language="F#" Value="member this.DeclaringType : Type" Usage="System.Reflection.Emit.FieldBuilder.DeclaringType" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property Type ^ DeclaringType { Type ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Type</ReturnType>
</ReturnValue>
<Docs>
<summary>Indicates a reference to the <see cref="T:System.Type" /> object for the type that declares this field. This property is read-only.</summary>
<value>A reference to the <see cref="T:System.Type" /> object for the type that declares this field.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="FieldHandle">
<MemberSignature Language="C#" Value="public override RuntimeFieldHandle FieldHandle { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.RuntimeFieldHandle FieldHandle" />
<MemberSignature Language="DocId" Value="P:System.Reflection.Emit.FieldBuilder.FieldHandle" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property FieldHandle As RuntimeFieldHandle" />
<MemberSignature Language="F#" Value="member this.FieldHandle : RuntimeFieldHandle" Usage="System.Reflection.Emit.FieldBuilder.FieldHandle" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property RuntimeFieldHandle FieldHandle { RuntimeFieldHandle get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.RuntimeFieldHandle</ReturnType>
</ReturnValue>
<Docs>
<summary>Indicates the internal metadata handle for this field. This property is read-only.</summary>
<value>The internal metadata handle for this field.</value>
<remarks>To be added.</remarks>
<exception cref="T:System.NotSupportedException">This method is not supported.</exception>
</Docs>
</Member>
<Member MemberName="FieldType">
<MemberSignature Language="C#" Value="public override Type FieldType { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Type FieldType" />
<MemberSignature Language="DocId" Value="P:System.Reflection.Emit.FieldBuilder.FieldType" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property FieldType As Type" />
<MemberSignature Language="F#" Value="member this.FieldType : Type" Usage="System.Reflection.Emit.FieldBuilder.FieldType" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property Type ^ FieldType { Type ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Type</ReturnType>
</ReturnValue>
<Docs>
<summary>Indicates the <see cref="T:System.Type" /> object that represents the type of this field. This property is read-only.</summary>
<value>The <see cref="T:System.Type" /> object that represents the type of this field.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<MemberGroup MemberName="GetCustomAttributes">
<Docs>
<summary>Returns the custom attributes defined for this field.</summary>
</Docs>
</MemberGroup>
<Member MemberName="GetCustomAttributes">
<MemberSignature Language="C#" Value="public override object[] GetCustomAttributes (bool inherit);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance object[] GetCustomAttributes(bool inherit) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Reflection.Emit.FieldBuilder.GetCustomAttributes(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetCustomAttributes (inherit As Boolean) As Object()" />
<MemberSignature Language="F#" Value="override this.GetCustomAttributes : bool -> obj[]" Usage="fieldBuilder.GetCustomAttributes inherit" />
<MemberSignature Language="C++ CLI" Value="public:
 override cli::array <System::Object ^> ^ GetCustomAttributes(bool inherit);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="inherit" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="inherit">Controls inheritance of custom attributes from base classes.</param>
<summary>Returns all the custom attributes defined for this field.</summary>
<returns>An array of type <see cref="T:System.Object" /> representing all the custom attributes of the constructor represented by this <see cref="T:System.Reflection.Emit.FieldBuilder" /> instance.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.NotSupportedException">This method is not supported.</exception>
</Docs>
</Member>
<Member MemberName="GetCustomAttributes">
<MemberSignature Language="C#" Value="public override object[] GetCustomAttributes (Type attributeType, bool inherit);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance object[] GetCustomAttributes(class System.Type attributeType, bool inherit) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Reflection.Emit.FieldBuilder.GetCustomAttributes(System.Type,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetCustomAttributes (attributeType As Type, inherit As Boolean) As Object()" />
<MemberSignature Language="F#" Value="override this.GetCustomAttributes : Type * bool -> obj[]" Usage="fieldBuilder.GetCustomAttributes (attributeType, inherit)" />
<MemberSignature Language="C++ CLI" Value="public:
 override cli::array <System::Object ^> ^ GetCustomAttributes(Type ^ attributeType, bool inherit);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="attributeType" Type="System.Type" />
<Parameter Name="inherit" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="attributeType">The custom attribute type.</param>
<param name="inherit">Controls inheritance of custom attributes from base classes.</param>
<summary>Returns all the custom attributes defined for this field identified by the given type.</summary>
<returns>An array of type <see cref="T:System.Object" /> representing all the custom attributes of the constructor represented by this <see cref="T:System.Reflection.Emit.FieldBuilder" /> instance.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.NotSupportedException">This method is not supported.</exception>
</Docs>
</Member>
<Member MemberName="GetValue">
<MemberSignature Language="C#" Value="public override object? GetValue (object? obj);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance object GetValue(object obj) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Reflection.Emit.FieldBuilder.GetValue(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetValue (obj As Object) As Object" />
<MemberSignature Language="F#" Value="override this.GetValue : obj -> obj" Usage="fieldBuilder.GetValue obj" />
<MemberSignature Language="C++ CLI" Value="public:
 override System::Object ^ GetValue(System::Object ^ obj);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="obj" Type="System.Object" />
</Parameters>
<Docs>
<param name="obj">The object on which to access the field.</param>
<summary>Retrieves the value of the field supported by the given object.</summary>
<returns>An <see cref="T:System.Object" /> containing the value of the field reflected by this instance.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the field is `static`, the `obj` parameter is ignored. For non-static fields, `obj` should be an instance of a class that inherits or declares the field.
The return type of <xref:System.Reflection.Emit.FieldBuilder.GetValue*> is <xref:System.Object>. For example, if the field holds a Boolean primitive value, an instance of <xref:System.Object> with the appropriate Boolean value is returned. Before returning the value, <xref:System.Reflection.Emit.FieldBuilder.GetValue*> checks to see if the user has access permission.
Access restrictions are ignored for fully-trusted code. `Private` constructors, methods, fields, and properties can be accessed and invoked using Reflection whenever the code is fully-trusted.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">This method is not supported.</exception>
</Docs>
</Member>
<Member MemberName="IsDefined">
<MemberSignature Language="C#" Value="public override bool IsDefined (Type attributeType, bool inherit);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool IsDefined(class System.Type attributeType, bool inherit) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Reflection.Emit.FieldBuilder.IsDefined(System.Type,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function IsDefined (attributeType As Type, inherit As Boolean) As Boolean" />
<MemberSignature Language="F#" Value="override this.IsDefined : Type * bool -> bool" Usage="fieldBuilder.IsDefined (attributeType, inherit)" />
<MemberSignature Language="C++ CLI" Value="public:
 override bool IsDefined(Type ^ attributeType, bool inherit);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="attributeType" Type="System.Type" />
<Parameter Name="inherit" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="attributeType">The type of the attribute.</param>
<param name="inherit">Controls inheritance of custom attributes from base classes.</param>
<summary>Indicates whether an attribute having the specified type is defined on a field.</summary>
<returns>
<see langword="true" /> if one or more instance of <paramref name="attributeType" /> is defined on this field; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.NotSupportedException">This method is not currently supported. Retrieve the field using <see cref="M:System.Type.GetField(System.String,System.Reflection.BindingFlags)" /> and call <see cref="M:System.Reflection.MemberInfo.IsDefined(System.Type,System.Boolean)" /> on the returned <see cref="T:System.Reflection.FieldInfo" />.</exception>
</Docs>
</Member>
<Member MemberName="MetadataToken">
<MemberSignature Language="C#" Value="public override int MetadataToken { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 MetadataToken" />
<MemberSignature Language="DocId" Value="P:System.Reflection.Emit.FieldBuilder.MetadataToken" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property MetadataToken As Integer" />
<MemberSignature Language="F#" Value="member this.MetadataToken : int" Usage="System.Reflection.Emit.FieldBuilder.MetadataToken" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property int MetadataToken { int get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a token that identifies the current dynamic module in metadata.</summary>
<value>An integer token that identifies the current module in metadata.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The tokens obtained using this property can be passed to the unmanaged Reflection API.
> [!NOTE]
> Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/).
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Module">
<MemberSignature Language="C#" Value="public override System.Reflection.Module Module { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Reflection.Module Module" />
<MemberSignature Language="DocId" Value="P:System.Reflection.Emit.FieldBuilder.Module" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property Module As Module" />
<MemberSignature Language="F#" Value="member this.Module : System.Reflection.Module" Usage="System.Reflection.Emit.FieldBuilder.Module" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Reflection::Module ^ Module { System::Reflection::Module ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Reflection.Module</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the module in which the type that contains this field is being defined.</summary>
<value>A <see cref="T:System.Reflection.Module" /> that represents the dynamic module in which this field is being defined.</value>
<remarks>To be added.</remarks>
<altmember cref="T:System.Reflection.Module" />
</Docs>
</Member>
<Member MemberName="Name">
<MemberSignature Language="C#" Value="public override string Name { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Name" />
<MemberSignature Language="DocId" Value="P:System.Reflection.Emit.FieldBuilder.Name" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property Name As String" />
<MemberSignature Language="F#" Value="member this.Name : string" Usage="System.Reflection.Emit.FieldBuilder.Name" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::String ^ Name { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Indicates the name of this field. This property is read-only.</summary>
<value>A <see cref="T:System.String" /> containing the name of this field.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The following code sample illustrates the use of `Name`.
:::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/FieldBuilder/Overview/FieldBuilder.cs":::
:::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/FieldBuilder/Overview/FieldBuilder.vb":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ReflectedType">
<MemberSignature Language="C#" Value="public override Type? ReflectedType { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Type ReflectedType" />
<MemberSignature Language="DocId" Value="P:System.Reflection.Emit.FieldBuilder.ReflectedType" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property ReflectedType As Type" />
<MemberSignature Language="F#" Value="member this.ReflectedType : Type" Usage="System.Reflection.Emit.FieldBuilder.ReflectedType" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property Type ^ ReflectedType { Type ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Type</ReturnType>
</ReturnValue>
<Docs>
<summary>Indicates the reference to the <see cref="T:System.Type" /> object from which this object was obtained. This property is read-only.</summary>
<value>A reference to the <see cref="T:System.Type" /> object from which this instance was obtained.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A <xref:System.Reflection.Emit.FieldBuilder> object represents a field of a particular class. In order to obtain a <xref:System.Reflection.Emit.FieldBuilder> object, the <xref:System.Type> object that represents the class that supports the field is queried. This property holds a reference to that <xref:System.Type> object.
The following code sample illustrates the use of `ReflectedType`.
:::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/FieldBuilder/Attributes/fieldbuilder_reflectedtype.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/FieldBuilder/Attributes/fieldbuilder_reflectedtype.vb" id="Snippet1":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="SetConstant">
<MemberSignature Language="C#" Value="public void SetConstant (object? defaultValue);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetConstant(object defaultValue) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Reflection.Emit.FieldBuilder.SetConstant(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub SetConstant (defaultValue As Object)" />
<MemberSignature Language="F#" Value="member this.SetConstant : obj -> unit" Usage="fieldBuilder.SetConstant defaultValue" />
<MemberSignature Language="C++ CLI" Value="public:
 void SetConstant(System::Object ^ defaultValue);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="defaultValue" Type="System.Object" />
</Parameters>
<Docs>
<param name="defaultValue">The new default value for this field.</param>
<summary>Sets the default value of this field.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
`defaultValue` is restricted to the following types: `Boolean`, `SByte`, `Int16`, `Int32`, `Int64`, `Byte`, `UInt16`, `UInt32`, `UInt64`, `Single`, `Double`, `DateTime`, `Char`, `String`, and `Enum`. If the field type is a reference type, CLS compliance requires `defaultValue` to be `null`. However, `defaultValue` can be non-null for a reference type as long as the value can be assigned to that reference type. For example, an `Int32` value can be assigned to a field of type <xref:System.Object>. This is not CLS-compliant, but it can be useful in interop scenarios.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The containing type has been created using <see cref="M:System.Reflection.Emit.TypeBuilder.CreateType" />.</exception>
<exception cref="T:System.ArgumentException">The field is not one of the supported types.
-or-
The type of <paramref name="defaultValue" /> does not match the type of the field.
-or-
The field is of type <see cref="T:System.Object" /> or other reference type, <paramref name="defaultValue" /> is not <see langword="null" />, and the value cannot be assigned to the reference type.</exception>
</Docs>
</Member>
<Member MemberName="SetConstantCore">
<MemberSignature Language="C#" Value="protected abstract void SetConstantCore (object? defaultValue);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void SetConstantCore(object defaultValue) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Reflection.Emit.FieldBuilder.SetConstantCore(System.Object)" />
<MemberSignature Language="VB.NET" Value="Protected MustOverride Sub SetConstantCore (defaultValue As Object)" />
<MemberSignature Language="F#" Value="abstract member SetConstantCore : obj -> unit" Usage="fieldBuilder.SetConstantCore defaultValue" />
<MemberSignature Language="C++ CLI" Value="protected:
 abstract void SetConstantCore(System::Object ^ defaultValue);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="defaultValue" Type="System.Object" />
</Parameters>
<Docs>
<param name="defaultValue">The new default value for this field.</param>
<summary>When overridden in a derived class, sets the default value of this field.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<MemberGroup MemberName="SetCustomAttribute">
<Docs>
<summary>Sets a custom attribute.</summary>
</Docs>
</MemberGroup>
<Member MemberName="SetCustomAttribute">
<MemberSignature Language="C#" Value="public void SetCustomAttribute (System.Reflection.Emit.CustomAttributeBuilder customBuilder);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetCustomAttribute(class System.Reflection.Emit.CustomAttributeBuilder customBuilder) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Reflection.Emit.FieldBuilder.SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder)" />
<MemberSignature Language="VB.NET" Value="Public Sub SetCustomAttribute (customBuilder As CustomAttributeBuilder)" />
<MemberSignature Language="F#" Value="member this.SetCustomAttribute : System.Reflection.Emit.CustomAttributeBuilder -> unit" Usage="fieldBuilder.SetCustomAttribute customBuilder" />
<MemberSignature Language="C++ CLI" Value="public:
 void SetCustomAttribute(System::Reflection::Emit::CustomAttributeBuilder ^ customBuilder);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="customBuilder" Type="System.Reflection.Emit.CustomAttributeBuilder" />
</Parameters>
<Docs>
<param name="customBuilder">An instance of a helper class to define the custom attribute.</param>
<summary>Sets a custom attribute using a custom attribute builder.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code sample illustrates the use of `SetCustomAttribute` in the context of <xref:System.Reflection.Emit.FieldBuilder>, using a <xref:System.Reflection.Emit.CustomAttributeBuilder>.
:::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/FieldBuilder/SetCustomAttribute/fieldbuilder_setcustomattributes.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/FieldBuilder/SetCustomAttribute/fieldbuilder_setcustomattributes.vb" id="Snippet1":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="customBuilder" /> is <see langword="null" />.</exception>
<exception cref="T:System.InvalidOperationException">The parent type of this field is complete.</exception>
</Docs>
</Member>
<Member MemberName="SetCustomAttribute">
<MemberSignature Language="C#" Value="public void SetCustomAttribute (System.Reflection.ConstructorInfo con, byte[] binaryAttribute);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetCustomAttribute(class System.Reflection.ConstructorInfo con, unsigned int8[] binaryAttribute) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Reflection.Emit.FieldBuilder.SetCustomAttribute(System.Reflection.ConstructorInfo,System.Byte[])" />
<MemberSignature Language="VB.NET" Value="Public Sub SetCustomAttribute (con As ConstructorInfo, binaryAttribute As Byte())" />
<MemberSignature Language="F#" Value="member this.SetCustomAttribute : System.Reflection.ConstructorInfo * byte[] -> unit" Usage="fieldBuilder.SetCustomAttribute (con, binaryAttribute)" />
<MemberSignature Language="C++ CLI" Value="public:
 void SetCustomAttribute(System::Reflection::ConstructorInfo ^ con, cli::array <System::Byte> ^ binaryAttribute);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="con" Type="System.Reflection.ConstructorInfo" />
<Parameter Name="binaryAttribute" Type="System.Byte[]" />
</Parameters>
<Docs>
<param name="con">The constructor for the custom attribute.</param>
<param name="binaryAttribute">A byte blob representing the attributes.</param>
<summary>Sets a custom attribute using a specified custom attribute blob.</summary>
<remarks>
<format type="text/markdown"><.
## Examples
The following code sample illustrates the use of `SetCustomAttribute` in the context of <xref:System.Reflection.Emit.FieldBuilder>, using a byte blob.
:::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/FieldBuilder/SetCustomAttribute/fieldbuilder_setcustomattributes.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/FieldBuilder/SetCustomAttribute/fieldbuilder_setcustomattributes.vb" id="Snippet1":::
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="con" /> or <paramref name="binaryAttribute" /> is <see langword="null" />.</exception>
<exception cref="T:System.InvalidOperationException">The parent type of this field is complete.</exception>
</Docs>
</Member>
<Member MemberName="SetCustomAttributeCore">
<MemberSignature Language="C#" Value="protected abstract void SetCustomAttributeCore (System.Reflection.ConstructorInfo con, ReadOnlySpan<byte> binaryAttribute);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void SetCustomAttributeCore(class System.Reflection.ConstructorInfo con, valuetype System.ReadOnlySpan`1<unsigned int8> binaryAttribute) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Reflection.Emit.FieldBuilder.SetCustomAttributeCore(System.Reflection.ConstructorInfo,System.ReadOnlySpan{System.Byte})" />
<MemberSignature Language="VB.NET" Value="Protected MustOverride Sub SetCustomAttributeCore (con As ConstructorInfo, binaryAttribute As ReadOnlySpan(Of Byte))" />
<MemberSignature Language="F#" Value="abstract member SetCustomAttributeCore : System.Reflection.ConstructorInfo * ReadOnlySpan<byte> -> unit" Usage="fieldBuilder.SetCustomAttributeCore (con, binaryAttribute)" />
<MemberSignature Language="C++ CLI" Value="protected:
 abstract void SetCustomAttributeCore(System::Reflection::ConstructorInfo ^ con, ReadOnlySpan<System::Byte> binaryAttribute);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="con" Type="System.Reflection.ConstructorInfo">
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(1)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(1)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="binaryAttribute" Type="System.ReadOnlySpan<System.Byte>" />
</Parameters>
<Docs>
<param name="con">The constructor for the custom attribute.</param>
<param name="binaryAttribute">A <see cref="T:System.ReadOnlySpan`1" /> of bytes representing the attribute.</param>
<summary>When overridden in a derived class, sets a custom attribute on this assembly.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SetOffset">
<MemberSignature Language="C#" Value="public void SetOffset (int iOffset);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetOffset(int32 iOffset) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Reflection.Emit.FieldBuilder.SetOffset(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub SetOffset (iOffset As Integer)" />
<MemberSignature Language="F#" Value="member this.SetOffset : int -> unit" Usage="fieldBuilder.SetOffset iOffset" />
<MemberSignature Language="C++ CLI" Value="public:
 void SetOffset(int iOffset);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="iOffset" Type="System.Int32" />
</Parameters>
<Docs>
<param name="iOffset">The offset of the field within the type containing this field.</param>
<summary>Specifies the field layout.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The following code sample illustrates the use of `SetOffset`.
:::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/FieldBuilder/SetMarshal/fieldbuilder_setoffset.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/FieldBuilder/SetMarshal/fieldbuilder_setoffset.vb" id="Snippet1":::
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The containing type has been created using <see cref="M:System.Reflection.Emit.TypeBuilder.CreateType" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="iOffset" /> is less than zero.</exception>
</Docs>
</Member>
<Member MemberName="SetOffsetCore">
<MemberSignature Language="C#" Value="protected abstract void SetOffsetCore (int iOffset);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void SetOffsetCore(int32 iOffset) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Reflection.Emit.FieldBuilder.SetOffsetCore(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Protected MustOverride Sub SetOffsetCore (iOffset As Integer)" />
<MemberSignature Language="F#" Value="abstract member SetOffsetCore : int -> unit" Usage="fieldBuilder.SetOffsetCore iOffset" />
<MemberSignature Language="C++ CLI" Value="protected:
 abstract void SetOffsetCore(int iOffset);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="iOffset" Type="System.Int32" />
</Parameters>
<Docs>
<param name="iOffset">The offset of the field within the type containing this field.</param>
<summary>When overridden in a derived class, specifies the field layout.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SetValue">
<MemberSignature Language="C#" Value="public override void SetValue (object? obj, object? val, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder? binder, System.Globalization.CultureInfo? culture);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void SetValue(object obj, object val, valuetype System.Reflection.BindingFlags invokeAttr, class System.Reflection.Binder binder, class System.Globalization.CultureInfo culture) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Reflection.Emit.FieldBuilder.SetValue(System.Object,System.Object,System.Reflection.BindingFlags,System.Reflection.Binder,System.Globalization.CultureInfo)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub SetValue (obj As Object, val As Object, invokeAttr As BindingFlags, binder As Binder, culture As CultureInfo)" />
<MemberSignature Language="F#" Value="override this.SetValue : obj * obj * System.Reflection.BindingFlags * System.Reflection.Binder * System.Globalization.CultureInfo -> unit" Usage="fieldBuilder.SetValue (obj, val, invokeAttr, binder, culture)" />
<MemberSignature Language="C++ CLI" Value="public:
 override void SetValue(System::Object ^ obj, System::Object ^ val, System::Reflection::BindingFlags invokeAttr, System::Reflection::Binder ^ binder, System::Globalization::CultureInfo ^ culture);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Reflection.Emit</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="obj" Type="System.Object" />
<Parameter Name="val" Type="System.Object" />
<Parameter Name="invokeAttr" Type="System.Reflection.BindingFlags" />
<Parameter Name="binder" Type="System.Reflection.Binder" />
<Parameter Name="culture" Type="System.Globalization.CultureInfo" />
</Parameters>
<Docs>
<param name="obj">The object on which to access the field.</param>
<param name="val">The value to assign to the field.</param>
<param name="invokeAttr">A member of <see langword="IBinder" /> that specifies the type of binding that is desired (for example, IBinder.CreateInstance, IBinder.ExactBinding).</param>
<param name="binder">A set of properties and enabling for binding, coercion of argument types, and invocation of members using reflection. If binder is null, then IBinder.DefaultBinding is used.</param>
<param name="culture">The software preferences of a particular culture.</param>
<summary>Sets the value of the field supported by the given object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method will assign the `val` parameter to the field reflected by this instance on <xref:System.Object> `obj`. If the field is static, `obj` will be ignored. For non-static fields, `obj` should be an instance of a class that inherits or declares the field.
The new value is passed as an <xref:System.Object>. For example, if the field's type is Boolean, an instance of <xref:System.Object> with the appropriate Boolean value is passed. Before setting the value, <xref:System.Reflection.Emit.FieldBuilder.SetValue*> checks to see if the user has access permission.
Access restrictions are ignored for fully-trusted code. `Private` constructors, methods, fields, and properties can be accessed and invoked using Reflection whenever the code is fully-trusted.
> [!NOTE]
> This method is currently not supported. As a workaround, retrieve the <xref:System.Reflection.FieldInfo> by reflecting on the finished type and call <xref:System.Reflection.FieldInfo.SetValue*> to set the value of the field.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">This method is not supported.</exception>
</Docs>
</Member>
</Members>
</Type>