~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to contrib/ICSharpCode.Decompiler/Tests/Types/S_TypeMemberDeclarations.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
ļ»æ// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
 
3
 
 
4
//$CS
 
5
using System;
 
6
//$CE
 
7
 
 
8
//$$ IndexerWithGetOnly
 
9
namespace IndexerWithGetOnly
 
10
{
 
11
        public class MyClass
 
12
        {
 
13
                public int this[int i]
 
14
                {
 
15
                        get
 
16
                        {
 
17
                                return i;
 
18
                        }
 
19
                }
 
20
        }
 
21
}
 
22
//$$ IndexerWithSetOnly
 
23
namespace IndexerWithSetOnly
 
24
{
 
25
        public class MyClass
 
26
        {
 
27
                public int this[int i]
 
28
                {
 
29
                        set
 
30
                        {
 
31
                        }
 
32
                }
 
33
        }
 
34
}
 
35
//$$ IndexerWithMoreParameters
 
36
namespace IndexerWithMoreParameters
 
37
{
 
38
        public class MyClass
 
39
        {
 
40
                public int this[int i, string s, Type t]
 
41
                {
 
42
                        get
 
43
                        {
 
44
                                return 0;
 
45
                        }
 
46
                }
 
47
        }
 
48
}
 
49
//$$ IndexerInGenericClass
 
50
namespace IndexerInGenericClass
 
51
{
 
52
        public class MyClass<T>
 
53
        {
 
54
                public int this[T t]
 
55
                {
 
56
                        get
 
57
                        {
 
58
                                return 0;
 
59
                        }
 
60
                }
 
61
        }
 
62
}
 
63
//$$ OverloadedIndexer
 
64
namespace OverloadedIndexer
 
65
{
 
66
        public class MyClass
 
67
        {
 
68
                public int this[int t]
 
69
                {
 
70
                        get
 
71
                        {
 
72
                                return 0;
 
73
                        }
 
74
                }
 
75
                public int this[string s]
 
76
                {
 
77
                        get
 
78
                        {
 
79
                                return 0;
 
80
                        }
 
81
                        set
 
82
                        {
 
83
                                Console.WriteLine(value + " " + s);
 
84
                        }
 
85
                }
 
86
        }
 
87
}
 
88
//$$ IndexerInInterface
 
89
namespace IndexerInInterface
 
90
{
 
91
        public interface IInterface
 
92
        {
 
93
                int this[string s, string s2]
 
94
                {
 
95
                        set;
 
96
                }
 
97
        }
 
98
}
 
99
//$$ IndexerInterfaceExplicitImplementation
 
100
namespace IndexerInterfaceExplicitImplementation
 
101
{
 
102
        public interface IMyInterface
 
103
        {
 
104
                int this[string s]
 
105
                {
 
106
                        get;
 
107
                }
 
108
        }
 
109
        public class MyClass : IMyInterface
 
110
        {
 
111
                int IMyInterface.this[string s]
 
112
                {
 
113
                        get
 
114
                        {
 
115
                                return 3;
 
116
                        }
 
117
                }
 
118
        }
 
119
}
 
120
//$$ IndexerInterfaceImplementation
 
121
namespace IndexerInterfaceImplementation
 
122
{
 
123
        public interface IMyInterface
 
124
        {
 
125
                int this[string s]
 
126
                {
 
127
                        get;
 
128
                }
 
129
        }
 
130
        public class MyClass : IMyInterface
 
131
        {
 
132
                public int this[string s]
 
133
                {
 
134
                        get
 
135
                        {
 
136
                                return 3;
 
137
                        }
 
138
                }
 
139
        }
 
140
}
 
141
//$$ IndexerAbstract
 
142
namespace IndexerAbstract
 
143
{
 
144
        public abstract class MyClass
 
145
        {
 
146
                public abstract int this[string s, string s2]
 
147
                {
 
148
                        set;
 
149
                }
 
150
                protected abstract string this[int index]
 
151
                {
 
152
                        get;
 
153
                }
 
154
        }
 
155
}
 
156
//$$ MethodExplicit
 
157
namespace MethodExplicit
 
158
{
 
159
        public interface IMyInterface
 
160
        {
 
161
                void MyMethod();
 
162
        }
 
163
        public class MyClass : IMyInterface
 
164
        {
 
165
                void IMyInterface.MyMethod()
 
166
                {
 
167
                }
 
168
        }
 
169
}
 
170
//$$ MethodFromInterfaceVirtual
 
171
namespace MethodFromInterfaceVirtual
 
172
{
 
173
        public interface IMyInterface
 
174
        {
 
175
                void MyMethod();
 
176
        }
 
177
        public class MyClass : IMyInterface
 
178
        {
 
179
                public virtual void MyMethod()
 
180
                {
 
181
                }
 
182
        }
 
183
}
 
184
//$$ MethodFromInterface
 
185
namespace MethodFromInterface
 
186
{
 
187
        public interface IMyInterface
 
188
        {
 
189
                void MyMethod();
 
190
        }
 
191
        public class MyClass : IMyInterface
 
192
        {
 
193
                public void MyMethod()
 
194
                {
 
195
                }
 
196
        }
 
197
}
 
198
//$$ MethodFromInterfaceAbstract
 
199
namespace MethodFromInterfaceAbstract
 
200
{
 
201
        public interface IMyInterface
 
202
        {
 
203
                void MyMethod();
 
204
        }
 
205
        public abstract class MyClass : IMyInterface
 
206
        {
 
207
                public abstract void MyMethod();
 
208
        }
 
209
}
 
210
//$$ PropertyInterface
 
211
namespace PropertyInterface
 
212
{
 
213
        public interface IMyInterface
 
214
        {
 
215
                int MyProperty
 
216
                {
 
217
                        get;
 
218
                        set;
 
219
                }
 
220
        }
 
221
}
 
222
//$$ PropertyInterfaceExplicitImplementation
 
223
namespace PropertyInterfaceExplicitImplementation
 
224
{
 
225
        public interface IMyInterface
 
226
        {
 
227
                int MyProperty
 
228
                {
 
229
                        get;
 
230
                        set;
 
231
                }
 
232
        }
 
233
        public class MyClass : IMyInterface
 
234
        {
 
235
                int IMyInterface.MyProperty
 
236
                {
 
237
                        get
 
238
                        {
 
239
                                return 0;
 
240
                        }
 
241
                        set
 
242
                        {
 
243
                        }
 
244
                }
 
245
        }
 
246
}
 
247
//$$ PropertyInterfaceImplementation
 
248
namespace PropertyInterfaceImplementation
 
249
{
 
250
        public interface IMyInterface
 
251
        {
 
252
                int MyProperty
 
253
                {
 
254
                        get;
 
255
                        set;
 
256
                }
 
257
        }
 
258
        public class MyClass : IMyInterface
 
259
        {
 
260
                public int MyProperty
 
261
                {
 
262
                        get
 
263
                        {
 
264
                                return 0;
 
265
                        }
 
266
                        set
 
267
                        {
 
268
                        }
 
269
                }
 
270
        }
 
271
}
 
272
//$$ PropertyPrivateGetPublicSet
 
273
namespace PropertyPrivateGetPublicSet
 
274
{
 
275
        public class MyClass
 
276
        {
 
277
                public int MyProperty
 
278
                {
 
279
                        private get
 
280
                        {
 
281
                                return 3;
 
282
                        }
 
283
                        set
 
284
                        {
 
285
                        }
 
286
                }
 
287
        }
 
288
}
 
289
//$$ PropertyPublicGetProtectedSet
 
290
namespace PropertyPublicGetProtectedSet
 
291
{
 
292
        public class MyClass
 
293
        {
 
294
                public int MyProperty
 
295
                {
 
296
                        get
 
297
                        {
 
298
                                return 3;
 
299
                        }
 
300
                        protected set
 
301
                        {
 
302
                        }
 
303
                }
 
304
        }
 
305
}
 
306
//$$ PropertyOverrideDefaultAccessorOnly
 
307
namespace PropertyOverrideDefaultAccessorOnly
 
308
{
 
309
        public class MyClass
 
310
        {
 
311
                public virtual int MyProperty
 
312
                {
 
313
                        get
 
314
                        {
 
315
                                return 3;
 
316
                        }
 
317
                        protected set
 
318
                        {
 
319
                        }
 
320
                }
 
321
        }
 
322
        public class Derived : MyClass
 
323
        {
 
324
                public override int MyProperty
 
325
                {
 
326
                        get
 
327
                        {
 
328
                                return 4;
 
329
                        }
 
330
                }
 
331
        }
 
332
}
 
333
//$$ PropertyOverrideRestrictedAccessorOnly
 
334
namespace PropertyOverrideRestrictedAccessorOnly
 
335
{
 
336
        public class MyClass
 
337
        {
 
338
                public virtual int MyProperty
 
339
                {
 
340
                        get
 
341
                        {
 
342
                                return 3;
 
343
                        }
 
344
                        protected set
 
345
                        {
 
346
                        }
 
347
                }
 
348
        }
 
349
        public class Derived : MyClass
 
350
        {
 
351
                public override int MyProperty
 
352
                {
 
353
                        protected set
 
354
                        {
 
355
                        }
 
356
                }
 
357
        }
 
358
}
 
359
//$$ PropertyOverrideOneAccessor
 
360
namespace PropertyOverrideOneAccessor
 
361
{
 
362
        public class MyClass
 
363
        {
 
364
                protected internal virtual int MyProperty
 
365
                {
 
366
                        get
 
367
                        {
 
368
                                return 3;
 
369
                        }
 
370
                        protected set
 
371
                        {
 
372
                        }
 
373
                }
 
374
        }
 
375
        public class DerivedNew : MyClass
 
376
        {
 
377
                public new virtual int MyProperty
 
378
                {
 
379
                        set
 
380
                        {
 
381
                        }
 
382
                }
 
383
        }
 
384
        public class DerivedOverride : DerivedNew
 
385
        {
 
386
                public override int MyProperty
 
387
                {
 
388
                        set
 
389
                        {
 
390
                        }
 
391
                }
 
392
        }
 
393
}
 
394
//$$ IndexerOverrideRestrictedAccessorOnly
 
395
namespace IndexerOverrideRestrictedAccessorOnly
 
396
{
 
397
        public class MyClass
 
398
        {
 
399
                public virtual int this[string s]
 
400
                {
 
401
                        get
 
402
                        {
 
403
                                return 3;
 
404
                        }
 
405
                        protected set
 
406
                        {
 
407
                        }
 
408
                }
 
409
                protected internal virtual int this[int i]
 
410
                {
 
411
                        protected get
 
412
                        {
 
413
                                return 2;
 
414
                        }
 
415
                        set
 
416
                        {
 
417
                        }
 
418
                }
 
419
        }
 
420
        public class Derived : MyClass
 
421
        {
 
422
                protected internal override int this[int i]
 
423
                {
 
424
                        protected get
 
425
                        {
 
426
                                return 4;
 
427
                        }
 
428
                }
 
429
        }
 
430
}
 
431
//$$ HideProperty
 
432
namespace HideProperty
 
433
{
 
434
        public class A
 
435
        {
 
436
                public virtual int P
 
437
                {
 
438
                        get
 
439
                        {
 
440
                                return 0;
 
441
                        }
 
442
                        set
 
443
                        {
 
444
                        }
 
445
                }
 
446
        }
 
447
        public class B : A
 
448
        {
 
449
                private new int P
 
450
                {
 
451
                        get
 
452
                        {
 
453
                                return 0;
 
454
                        }
 
455
                        set
 
456
                        {
 
457
                        }
 
458
                }
 
459
        }
 
460
        public class C : B
 
461
        {
 
462
                public override int P
 
463
                {
 
464
                        set
 
465
                        {
 
466
                        }
 
467
                }
 
468
        }
 
469
}
 
470
//$$ HideMembers
 
471
namespace HideMembers
 
472
{
 
473
        public class A
 
474
        {
 
475
                public int F;
 
476
                public int Prop
 
477
                {
 
478
                        get
 
479
                        {
 
480
                                return 3;
 
481
                        }
 
482
                }
 
483
                public int G
 
484
                {
 
485
                        get
 
486
                        {
 
487
                                return 3;
 
488
                        }
 
489
                }
 
490
        }
 
491
        public class B : A
 
492
        {
 
493
                public new int F
 
494
                {
 
495
                        get
 
496
                        {
 
497
                                return 3;
 
498
                        }
 
499
                }
 
500
                public new string Prop
 
501
                {
 
502
                        get
 
503
                        {
 
504
                                return "a";
 
505
                        }
 
506
                }
 
507
        }
 
508
        public class C : A
 
509
        {
 
510
                public new int G;
 
511
        }
 
512
        public class D : A
 
513
        {
 
514
                public new void F()
 
515
                {
 
516
                }
 
517
        }
 
518
        public class D1 : D
 
519
        {
 
520
                public new int F;
 
521
        }
 
522
        public class E : A
 
523
        {
 
524
                private new class F
 
525
                {
 
526
                }
 
527
        }
 
528
}
 
529
//$$ HideMembers2
 
530
namespace HideMembers2
 
531
{
 
532
        public class G
 
533
        {
 
534
                public int Item
 
535
                {
 
536
                        get
 
537
                        {
 
538
                                return 1;
 
539
                        }
 
540
                }
 
541
        }
 
542
        public class G2 : G
 
543
        {
 
544
                public int this[int i]
 
545
                {
 
546
                        get
 
547
                        {
 
548
                                return 2;
 
549
                        }
 
550
                }
 
551
        }
 
552
        public class G3 : G2
 
553
        {
 
554
                public new int Item
 
555
                {
 
556
                        get
 
557
                        {
 
558
                                return 4;
 
559
                        }
 
560
                }
 
561
        }
 
562
        public class H
 
563
        {
 
564
                public int this[int j]
 
565
                {
 
566
                        get
 
567
                        {
 
568
                                return 0;
 
569
                        }
 
570
                }
 
571
        }
 
572
        public class H2 : H
 
573
        {
 
574
                public int Item
 
575
                {
 
576
                        get
 
577
                        {
 
578
                                return 2;
 
579
                        }
 
580
                }
 
581
        }
 
582
        public class H3 : H2
 
583
        {
 
584
                public new string this[int j]
 
585
                {
 
586
                        get
 
587
                        {
 
588
                                return null;
 
589
                        }
 
590
                }
 
591
        }
 
592
}
 
593
//$$ HideMembers2a
 
594
namespace HideMembers2a
 
595
{
 
596
        public interface IA
 
597
        {
 
598
                int this[int i]
 
599
                {
 
600
                        get;
 
601
                }
 
602
        }
 
603
        public class A : IA
 
604
        {
 
605
                int IA.this[int i]
 
606
                {
 
607
                        get
 
608
                        {
 
609
                                throw new NotImplementedException();
 
610
                        }
 
611
                }
 
612
        }
 
613
        public class A1 : A
 
614
        {
 
615
                public int this[int i]
 
616
                {
 
617
                        get
 
618
                        {
 
619
                                return 3;
 
620
                        }
 
621
                }
 
622
        }
 
623
}
 
624
//$$ HideMembers3
 
625
namespace HideMembers3
 
626
{
 
627
        public class G<T>
 
628
        {
 
629
                public void M1(T p)
 
630
                {
 
631
                }
 
632
                public int M2(int t)
 
633
                {
 
634
                        return 3;
 
635
                }
 
636
        }
 
637
        public class G1<T> : G<int>
 
638
        {
 
639
                public new int M1(int i)
 
640
                {
 
641
                        return 0;
 
642
                }
 
643
                public int M2(T i)
 
644
                {
 
645
                        return 2;
 
646
                }
 
647
        }
 
648
        public class G2<T> : G<int>
 
649
        {
 
650
                public int M1(T p)
 
651
                {
 
652
                        return 4;
 
653
                }
 
654
        }
 
655
        public class J
 
656
        {
 
657
                public int P
 
658
                {
 
659
                        get
 
660
                        {
 
661
                                return 2;
 
662
                        }
 
663
                }
 
664
        }
 
665
        public class J2 : J
 
666
        {
 
667
                public int get_P;
 
668
        }
 
669
}
 
670
//$$ HideMembers4
 
671
namespace HideMembers4
 
672
{
 
673
        public class A
 
674
        {
 
675
                public void M<T>(T t)
 
676
                {
 
677
                }
 
678
        }
 
679
        public class A1 : A
 
680
        {
 
681
                public new void M<K>(K t)
 
682
                {
 
683
                }
 
684
                public void M(int t)
 
685
                {
 
686
                }
 
687
        }
 
688
        public class B
 
689
        {
 
690
                public void M<T>()
 
691
                {
 
692
                }
 
693
                public void M1<T>()
 
694
                {
 
695
                }
 
696
                public void M2<T>(T t)
 
697
                {
 
698
                }
 
699
        }
 
700
        public class B1 : B
 
701
        {
 
702
                public void M<T1, T2>()
 
703
                {
 
704
                }
 
705
                public new void M1<R>()
 
706
                {
 
707
                }
 
708
                public new void M2<R>(R r)
 
709
                {
 
710
                }
 
711
        }
 
712
        public class C<T>
 
713
        {
 
714
                public void M<TT>(T t)
 
715
                {
 
716
                }
 
717
        }
 
718
        public class C1<K> : C<K>
 
719
        {
 
720
                public void M<TT>(TT t)
 
721
                {
 
722
                }
 
723
        }
 
724
}
 
725
//$$ HideMembers5
 
726
namespace HideMembers5
 
727
{
 
728
        public class A
 
729
        {
 
730
                public void M(int t)
 
731
                {
 
732
                }
 
733
        }
 
734
        public class A1 : A
 
735
        {
 
736
                public void M(ref int t)
 
737
                {
 
738
                }
 
739
        }
 
740
        public class B
 
741
        {
 
742
                public void M(ref int l)
 
743
                {
 
744
                }
 
745
        }
 
746
        public class B1 : B
 
747
        {
 
748
                public void M(out int l)
 
749
                {
 
750
                        l = 2;
 
751
                }
 
752
                public void M(ref long l)
 
753
                {
 
754
                }
 
755
        }
 
756
}
 
757
//$$ HideMemberSkipNotVisible
 
758
namespace HideMemberSkipNotVisible
 
759
{
 
760
        public class A
 
761
        {
 
762
                protected int F;
 
763
                protected string P
 
764
                {
 
765
                        get
 
766
                        {
 
767
                                return null;
 
768
                        }
 
769
                }
 
770
        }
 
771
        public class B : A
 
772
        {
 
773
                private new string F;
 
774
                private new int P
 
775
                {
 
776
                        set
 
777
                        {
 
778
                        }
 
779
                }
 
780
        }
 
781
}
 
782
//$$ HideNestedClass
 
783
namespace HideNestedClass
 
784
{
 
785
        public class A
 
786
        {
 
787
                public class N1
 
788
                {
 
789
                }
 
790
                protected class N2
 
791
                {
 
792
                }
 
793
                private class N3
 
794
                {
 
795
                }
 
796
                internal class N4
 
797
                {
 
798
                }
 
799
                protected internal class N5
 
800
                {
 
801
                }
 
802
        }
 
803
        public class B : A
 
804
        {
 
805
                public new int N1;
 
806
                public new int N2;
 
807
                public int N3;
 
808
                public new int N4;
 
809
                public new int N5;
 
810
        }
 
811
}
 
812
//$$ HidePropertyReservedMethod
 
813
namespace HidePropertyReservedMethod
 
814
{
 
815
        public class A
 
816
        {
 
817
                public int P
 
818
                {
 
819
                        get
 
820
                        {
 
821
                                return 1;
 
822
                        }
 
823
                }
 
824
        }
 
825
        public class B : A
 
826
        {
 
827
                public int get_P()
 
828
                {
 
829
                        return 2;
 
830
                }
 
831
                public void set_P(int value)
 
832
                {
 
833
                }
 
834
        }
 
835
}
 
836
//$$ HideIndexerDiffAccessor
 
837
namespace HideIndexerDiffAccessor
 
838
{
 
839
        public class A
 
840
        {
 
841
                public int this[int i]
 
842
                {
 
843
                        get
 
844
                        {
 
845
                                return 2;
 
846
                        }
 
847
                }
 
848
        }
 
849
        public class B : A
 
850
        {
 
851
                public new int this[int j]
 
852
                {
 
853
                        set
 
854
                        {
 
855
                        }
 
856
                }
 
857
        }
 
858
}
 
859
//$$ HideIndexerGeneric
 
860
namespace HideIndexerGeneric
 
861
{
 
862
        public class A<T>
 
863
        {
 
864
                public virtual int this[T r]
 
865
                {
 
866
                        get
 
867
                        {
 
868
                                return 0;
 
869
                        }
 
870
                        set
 
871
                        {
 
872
                        }
 
873
                }
 
874
        }
 
875
        public class B : A<int>
 
876
        {
 
877
                private new int this[int k]
 
878
                {
 
879
                        get
 
880
                        {
 
881
                                return 0;
 
882
                        }
 
883
                        set
 
884
                        {
 
885
                        }
 
886
                }
 
887
        }
 
888
        public class C<T> : A<T>
 
889
        {
 
890
                public override int this[T s]
 
891
                {
 
892
                        set
 
893
                        {
 
894
                        }
 
895
                }
 
896
        }
 
897
        public class D<T> : C<T>
 
898
        {
 
899
                public new virtual int this[T s]
 
900
                {
 
901
                        set
 
902
                        {
 
903
                        }
 
904
                }
 
905
        }
 
906
}
 
907
//$$ HideMethod
 
908
namespace HideMethod
 
909
{
 
910
        public class A
 
911
        {
 
912
                public virtual void F()
 
913
                {
 
914
                }
 
915
        }
 
916
        public class B : A
 
917
        {
 
918
                private new void F()
 
919
                {
 
920
                        base.F();
 
921
                }
 
922
        }
 
923
        public class C : B
 
924
        {
 
925
                public override void F()
 
926
                {
 
927
                        base.F();
 
928
                }
 
929
        }
 
930
}
 
931
//$$ HideMethodGeneric
 
932
namespace HideMethodGeneric
 
933
{
 
934
        public class A<T>
 
935
        {
 
936
                public virtual void F(T s)
 
937
                {
 
938
                }
 
939
                public new static bool Equals(object o1, object o2)
 
940
                {
 
941
                        return true;
 
942
                }
 
943
        }
 
944
        public class B : A<string>
 
945
        {
 
946
                private new void F(string k)
 
947
                {
 
948
                }
 
949
                public void F(int i)
 
950
                {
 
951
                }
 
952
        }
 
953
        public class C<T> : A<T>
 
954
        {
 
955
                public override void F(T r)
 
956
                {
 
957
                }
 
958
                public void G(T t)
 
959
                {
 
960
                }
 
961
        }
 
962
        public class D<T1> : C<T1>
 
963
        {
 
964
                public new virtual void F(T1 k)
 
965
                {
 
966
                }
 
967
                public virtual void F<T2>(T2 k)
 
968
                {
 
969
                }
 
970
                public virtual void G<T2>(T2 t)
 
971
                {
 
972
                }
 
973
        }
 
974
}
 
975
//$$ HideMethodGenericSkipPrivate
 
976
namespace HideMethodGenericSkipPrivate
 
977
{
 
978
        public class A<T>
 
979
        {
 
980
                public virtual void F(T t)
 
981
                {
 
982
                }
 
983
        }
 
984
        public class B<T> : A<T>
 
985
        {
 
986
                private new void F(T t)
 
987
                {
 
988
                }
 
989
                private void K()
 
990
                {
 
991
                }
 
992
        }
 
993
        public class C<T> : B<T>
 
994
        {
 
995
                public override void F(T tt)
 
996
                {
 
997
                }
 
998
                public void K()
 
999
                {
 
1000
                }
 
1001
        }
 
1002
        public class D : B<int>
 
1003
        {
 
1004
                public override void F(int t)
 
1005
                {
 
1006
                }
 
1007
        }
 
1008
}
 
1009
//$$ HideMethodGeneric2
 
1010
namespace HideMethodGeneric2
 
1011
{
 
1012
        public class A
 
1013
        {
 
1014
                public virtual void F(int i)
 
1015
                {
 
1016
                }
 
1017
                public void K()
 
1018
                {
 
1019
                }
 
1020
        }
 
1021
        public class B<T> : A
 
1022
        {
 
1023
                protected virtual void F(T t)
 
1024
                {
 
1025
                }
 
1026
                public void K<T2>()
 
1027
                {
 
1028
                }
 
1029
        }
 
1030
        public class C : B<int>
 
1031
        {
 
1032
                protected override void F(int k)
 
1033
                {
 
1034
                }
 
1035
                public new void K<T3>()
 
1036
                {
 
1037
                }
 
1038
        }
 
1039
        public class D : B<string>
 
1040
        {
 
1041
                public override void F(int k)
 
1042
                {
 
1043
                }
 
1044
                public void L<T4>()
 
1045
                {
 
1046
                }
 
1047
        }
 
1048
        public class E<T>
 
1049
        {
 
1050
                public void M<T2>(T t, T2 t2)
 
1051
                {
 
1052
                }
 
1053
        }
 
1054
        public class F<T> : E<T>
 
1055
        {
 
1056
                public void M(T t1, T t2)
 
1057
                {
 
1058
                }
 
1059
        }
 
1060
}
 
1061
//$$ HideMethodDiffSignatures
 
1062
namespace HideMethodDiffSignatures
 
1063
{
 
1064
        public class C1<T>
 
1065
        {
 
1066
                public virtual void M(T arg)
 
1067
                {
 
1068
                }
 
1069
        }
 
1070
        public class C2<T1, T2> : C1<T2>
 
1071
        {
 
1072
                public new virtual void M(T2 arg)
 
1073
                {
 
1074
                }
 
1075
        }
 
1076
        public class C3 : C2<int, bool>
 
1077
        {
 
1078
                public new virtual void M(bool arg)
 
1079
                {
 
1080
                }
 
1081
        }
 
1082
}
 
1083
//$$ HideMethodStatic
 
1084
namespace HideMethodStatic
 
1085
{
 
1086
        public class A
 
1087
        {
 
1088
                public int N
 
1089
                {
 
1090
                        get
 
1091
                        {
 
1092
                                return 0;
 
1093
                        }
 
1094
                }
 
1095
        }
 
1096
        public class B
 
1097
        {
 
1098
                public int N()
 
1099
                {
 
1100
                        return 0;
 
1101
                }
 
1102
        }
 
1103
}
 
1104
//$$ HideEvent
 
1105
namespace HideEvent
 
1106
{
 
1107
        public class A
 
1108
        {
 
1109
                public virtual event EventHandler E;
 
1110
                public event EventHandler F;
 
1111
        }
 
1112
        public class B : A
 
1113
        {
 
1114
                public new virtual event EventHandler E;
 
1115
                public new event EventHandler F;
 
1116
        }
 
1117
        public class C : B
 
1118
        {
 
1119
                public override event EventHandler E;
 
1120
        }
 
1121
}