diff --git a/docs/csharp/misc/cs0533.md b/docs/csharp/misc/cs0533.md index d707ccf489bfa..861173c6ee433 100644 --- a/docs/csharp/misc/cs0533.md +++ b/docs/csharp/misc/cs0533.md @@ -23,7 +23,7 @@ ms.author: "wiwagn" The following sample generates CS0533: -``` +```csharp // CS0533.cs namespace x { diff --git a/docs/csharp/misc/cs0534.md b/docs/csharp/misc/cs0534.md index 150e24df87481..444b33a77fc61 100644 --- a/docs/csharp/misc/cs0534.md +++ b/docs/csharp/misc/cs0534.md @@ -21,7 +21,7 @@ ms.author: "wiwagn" The following sample generates CS0534: -``` +```csharp // CS0534.cs namespace x { diff --git a/docs/csharp/misc/cs0535.md b/docs/csharp/misc/cs0535.md index 6e42892596b41..a7c302ec7dd2e 100644 --- a/docs/csharp/misc/cs0535.md +++ b/docs/csharp/misc/cs0535.md @@ -22,7 +22,7 @@ ms.author: "wiwagn" ## Example The following sample generates CS0535. -``` +```csharp // CS0535.cs public interface A { @@ -41,7 +41,7 @@ public class C : A { ## Example The following sample generates CS0535. -``` +```csharp // CS0535_b.cs using System; class C : IDisposable {} // CS0535 diff --git a/docs/csharp/misc/cs0538.md b/docs/csharp/misc/cs0538.md index 01822d74e3431..4abbe3dedf25f 100644 --- a/docs/csharp/misc/cs0538.md +++ b/docs/csharp/misc/cs0538.md @@ -21,7 +21,7 @@ ms.author: "wiwagn" The following sample generates CS0538: -``` +```csharp // CS0538.cs interface MyIFace { diff --git a/docs/csharp/misc/cs0539.md b/docs/csharp/misc/cs0539.md index c83706d5b5123..e8a47a704e4ff 100644 --- a/docs/csharp/misc/cs0539.md +++ b/docs/csharp/misc/cs0539.md @@ -21,7 +21,7 @@ ms.author: "wiwagn" The following sample generates CS0539: -``` +```csharp // CS0539.cs namespace x { diff --git a/docs/csharp/misc/cs0540.md b/docs/csharp/misc/cs0540.md index ebefe22feb534..385d9ad7953a0 100644 --- a/docs/csharp/misc/cs0540.md +++ b/docs/csharp/misc/cs0540.md @@ -22,7 +22,7 @@ ms.author: "wiwagn" ## Example The following sample generates CS0540. -``` +```csharp // CS0540.cs interface I { @@ -45,7 +45,7 @@ public class Cly : I ## Example The following sample generates CS0540. -``` +```csharp // CS0540_b.cs using System; class C { diff --git a/docs/csharp/misc/cs0541.md b/docs/csharp/misc/cs0541.md index cf8bb2825b158..9070493d48f3a 100644 --- a/docs/csharp/misc/cs0541.md +++ b/docs/csharp/misc/cs0541.md @@ -21,7 +21,7 @@ ms.author: "wiwagn" The following sample generates CS0541: -``` +```csharp // CS0541.cs namespace x { diff --git a/docs/csharp/misc/cs0543.md b/docs/csharp/misc/cs0543.md index fbf41e460d02c..36e021b2d9883 100644 --- a/docs/csharp/misc/cs0543.md +++ b/docs/csharp/misc/cs0543.md @@ -21,7 +21,7 @@ ms.author: "wiwagn" The following sample generates CS0543: -``` +```csharp // CS0543.cs namespace x { diff --git a/docs/csharp/misc/cs0544.md b/docs/csharp/misc/cs0544.md index dfd2e17e55cdf..222e51d11bb9f 100644 --- a/docs/csharp/misc/cs0544.md +++ b/docs/csharp/misc/cs0544.md @@ -21,7 +21,7 @@ ms.author: "wiwagn" The following sample generates CS0544: -``` +```csharp // CS0544.cs // compile with: /target:library public class a diff --git a/docs/csharp/misc/cs0546.md b/docs/csharp/misc/cs0546.md index 4720d89348e5f..73c5335b6bd04 100644 --- a/docs/csharp/misc/cs0546.md +++ b/docs/csharp/misc/cs0546.md @@ -30,7 +30,7 @@ ms.author: "wiwagn" ## Example The following sample generates CS0546 because the base class does not declare a set accessor for the property. -``` +```csharp // CS0546.cs // compile with: /target:library public class a diff --git a/docs/csharp/misc/cs0547.md b/docs/csharp/misc/cs0547.md index e6a84bd1c55ac..48077e2679f02 100644 --- a/docs/csharp/misc/cs0547.md +++ b/docs/csharp/misc/cs0547.md @@ -23,7 +23,7 @@ ms.author: "wiwagn" The following sample generates CS0547: -``` +```csharp // CS0547.cs public class a { diff --git a/docs/csharp/misc/cs0548.md b/docs/csharp/misc/cs0548.md index 7a1d66121f387..4e74188f8a765 100644 --- a/docs/csharp/misc/cs0548.md +++ b/docs/csharp/misc/cs0548.md @@ -24,7 +24,7 @@ ms.author: "wiwagn" ## Example The following sample generates CS0548. -``` +```csharp // CS0548.cs // compile with: /target:library public class b diff --git a/docs/csharp/misc/cs0549.md b/docs/csharp/misc/cs0549.md index 1fe98b6ddc644..7a517f24af169 100644 --- a/docs/csharp/misc/cs0549.md +++ b/docs/csharp/misc/cs0549.md @@ -21,7 +21,7 @@ ms.author: "wiwagn" The following sample generates CS0549: -``` +```csharp // CS0549.cs // compile with: /target:library sealed public class MyClass diff --git a/docs/csharp/misc/cs0550.md b/docs/csharp/misc/cs0550.md index afed598b51986..8dd9620ad406b 100644 --- a/docs/csharp/misc/cs0550.md +++ b/docs/csharp/misc/cs0550.md @@ -24,7 +24,7 @@ ms.author: "wiwagn" ## Example The following sample generates CS0550. -``` +```csharp // CS0550.cs namespace x { diff --git a/docs/csharp/misc/cs0551.md b/docs/csharp/misc/cs0551.md index 27419912c47c0..8b7bf7eacc88c 100644 --- a/docs/csharp/misc/cs0551.md +++ b/docs/csharp/misc/cs0551.md @@ -24,7 +24,7 @@ Explicit interface implementation 'implementation' is missing accessor 'accessor ## Example The following sample generates CS0551. -``` +```csharp // CS0551.cs // compile with: /target:library interface ii diff --git a/docs/csharp/misc/cs0553.md b/docs/csharp/misc/cs0553.md index 4659578893cf5..a8087b2a57ed6 100644 --- a/docs/csharp/misc/cs0553.md +++ b/docs/csharp/misc/cs0553.md @@ -21,7 +21,7 @@ ms.author: "wiwagn" The following sample generates CS0553: -``` +```csharp // CS0553.cs namespace x { diff --git a/docs/csharp/misc/cs0554.md b/docs/csharp/misc/cs0554.md index 63dd258e407c9..bc442375e73ee 100644 --- a/docs/csharp/misc/cs0554.md +++ b/docs/csharp/misc/cs0554.md @@ -23,7 +23,7 @@ ms.author: "wiwagn" The following sample generates CS0554: -``` +```csharp // CS0554.cs namespace x { diff --git a/docs/csharp/misc/cs0555.md b/docs/csharp/misc/cs0555.md index a8fcb53492fd6..3c5cb579f5970 100644 --- a/docs/csharp/misc/cs0555.md +++ b/docs/csharp/misc/cs0555.md @@ -21,7 +21,7 @@ User-defined operator cannot take an object of the enclosing type and convert to The fo3llowing sample generates CS0555: -``` +```csharp // CS0555.cs public class MyClass { diff --git a/docs/csharp/misc/cs0556.md b/docs/csharp/misc/cs0556.md index b4ab40f71d8d9..834212b76f963 100644 --- a/docs/csharp/misc/cs0556.md +++ b/docs/csharp/misc/cs0556.md @@ -21,7 +21,7 @@ User-defined conversion must convert to or from the enclosing type The following sample generates CS0556: -``` +```csharp // CS0556.cs namespace x { diff --git a/docs/csharp/misc/cs0557.md b/docs/csharp/misc/cs0557.md index 2b2b2e257a1d5..53ebb8f5c53a6 100644 --- a/docs/csharp/misc/cs0557.md +++ b/docs/csharp/misc/cs0557.md @@ -21,7 +21,7 @@ Duplicate user-defined conversion in type 'class' The following example generates CS0557: -``` +```csharp // CS0557.cs namespace x { diff --git a/docs/csharp/misc/cs0558.md b/docs/csharp/misc/cs0558.md index 738a542bc38ca..a98d9a9822a4d 100644 --- a/docs/csharp/misc/cs0558.md +++ b/docs/csharp/misc/cs0558.md @@ -21,7 +21,7 @@ User-defined operator 'operator' must be declared static and public The following sample generates CS0558: -``` +```csharp // CS0558.cs namespace x { diff --git a/docs/csharp/misc/cs0559.md b/docs/csharp/misc/cs0559.md index dce14e39ada5d..1b21d4b404e3b 100644 --- a/docs/csharp/misc/cs0559.md +++ b/docs/csharp/misc/cs0559.md @@ -22,7 +22,7 @@ The parameter type for ++ or -- operator must be the containing type ## Example The following sample generates CS0559: -``` +```csharp // CS0559.cs // compile with: /target:library public class iii @@ -49,7 +49,7 @@ public class iii ## Example The following sample generates CS0559. -``` +```csharp // CS0559_b.cs // compile with: /target:library public struct S diff --git a/docs/csharp/misc/cs0562.md b/docs/csharp/misc/cs0562.md index 00a9d1fa9f945..5461e1408a50b 100644 --- a/docs/csharp/misc/cs0562.md +++ b/docs/csharp/misc/cs0562.md @@ -22,7 +22,7 @@ The parameter of a unary operator must be the containing type ## Example The following sample generates CS0562: -``` +```csharp // CS0562.cs public class iii { diff --git a/docs/csharp/misc/cs0564.md b/docs/csharp/misc/cs0564.md index 09f77d097d080..acd1ddb883aa4 100644 --- a/docs/csharp/misc/cs0564.md +++ b/docs/csharp/misc/cs0564.md @@ -21,7 +21,7 @@ The first operand of an overloaded shift operator must have the same type as the The following sample generates CS0564: -``` +```csharp // CS0564.cs using System; class C diff --git a/docs/csharp/misc/cs0567.md b/docs/csharp/misc/cs0567.md index 709b8cda419d6..0960514169afd 100644 --- a/docs/csharp/misc/cs0567.md +++ b/docs/csharp/misc/cs0567.md @@ -21,7 +21,7 @@ Interfaces cannot contain operators The following sample generates CS0567: -``` +```csharp // CS0567.cs interface IA { diff --git a/docs/csharp/misc/cs0568.md b/docs/csharp/misc/cs0568.md index 80ccded4f3db0..12e71e11029b7 100644 --- a/docs/csharp/misc/cs0568.md +++ b/docs/csharp/misc/cs0568.md @@ -21,7 +21,7 @@ Structs cannot contain explicit parameterless constructors The following sample generates CS0568: -``` +```csharp // CS0568.cs public struct ClassY { diff --git a/docs/csharp/misc/cs0572.md b/docs/csharp/misc/cs0572.md index d148aec10b592..471a1a7995f11 100644 --- a/docs/csharp/misc/cs0572.md +++ b/docs/csharp/misc/cs0572.md @@ -21,7 +21,7 @@ ms.author: "wiwagn" The following sample generates CS0572: -``` +```csharp // CS0572.cs using System; class C diff --git a/docs/csharp/misc/cs0573.md b/docs/csharp/misc/cs0573.md index 9d34205cde274..7ba5435695ae6 100644 --- a/docs/csharp/misc/cs0573.md +++ b/docs/csharp/misc/cs0573.md @@ -22,7 +22,7 @@ ms.author: "wiwagn" ## Example The following sample generates CS0573: -``` +```csharp // CS0573.cs namespace x { diff --git a/docs/csharp/misc/cs0574.md b/docs/csharp/misc/cs0574.md index 5dbc3d4c13ea2..8c813ed47aec1 100644 --- a/docs/csharp/misc/cs0574.md +++ b/docs/csharp/misc/cs0574.md @@ -21,7 +21,7 @@ Name of destructor must match name of class The following sample generates CS0574: -``` +```csharp // CS0574.cs namespace x { diff --git a/docs/csharp/misc/cs0575.md b/docs/csharp/misc/cs0575.md index f097010f42df1..5d7ecbf36cc99 100644 --- a/docs/csharp/misc/cs0575.md +++ b/docs/csharp/misc/cs0575.md @@ -21,7 +21,7 @@ Only class types can contain destructors The following sample generates CS0575: -``` +```csharp // CS0575.cs namespace x { diff --git a/docs/csharp/misc/cs0576.md b/docs/csharp/misc/cs0576.md index cd5f083217767..83162a8e9309b 100644 --- a/docs/csharp/misc/cs0576.md +++ b/docs/csharp/misc/cs0576.md @@ -22,7 +22,7 @@ Namespace 'namespace' contains a definition conflicting with alias 'identifier' ## Example The following sample generates CS0576: -``` +```csharp // CS0576.cs using SysIO = System.IO; public class SysIO diff --git a/docs/csharp/misc/cs0577.md b/docs/csharp/misc/cs0577.md index 253ce46f34c0d..ffec951e9a6d4 100644 --- a/docs/csharp/misc/cs0577.md +++ b/docs/csharp/misc/cs0577.md @@ -21,7 +21,7 @@ The Conditional attribute is not valid on 'function' because it is a constructor For example, you cannot use some attributes on an explicit interface definition. The following sample generates CS0577: -``` +```csharp // CS0577.cs // compile with: /target:library interface I diff --git a/docs/csharp/misc/cs0578.md b/docs/csharp/misc/cs0578.md index 3908e1edc8be4..a9d89e4963279 100644 --- a/docs/csharp/misc/cs0578.md +++ b/docs/csharp/misc/cs0578.md @@ -152,7 +152,7 @@ The Conditional attribute is not valid on 'function' because its return type is ## Example The following sample generates CS0578. To resolve this error, you must either delete , or you must change the return value of the method to `void`. -``` +```csharp // CS0578.cs // compile with: /target:library public class MyClass diff --git a/docs/csharp/misc/cs0582.md b/docs/csharp/misc/cs0582.md index 603b2b5bdb7fa..e557f970c5f15 100644 --- a/docs/csharp/misc/cs0582.md +++ b/docs/csharp/misc/cs0582.md @@ -21,7 +21,7 @@ The Conditional not valid on interface members The following sample generates CS0582: -``` +```csharp // CS0582.cs // compile with: /target:library using System.Diagnostics; diff --git a/docs/csharp/misc/cs0590.md b/docs/csharp/misc/cs0590.md index eb9f0870fdc57..ee78fe6abff96 100644 --- a/docs/csharp/misc/cs0590.md +++ b/docs/csharp/misc/cs0590.md @@ -21,7 +21,7 @@ User-defined operators cannot return void The following sample generates CS0590: -``` +```csharp // CS0590.cs namespace x { diff --git a/docs/csharp/misc/cs0591.md b/docs/csharp/misc/cs0591.md index 48a41c8fa6a0e..8da9e64bd5977 100644 --- a/docs/csharp/misc/cs0591.md +++ b/docs/csharp/misc/cs0591.md @@ -22,7 +22,7 @@ Invalid value for argument to 'attribute' attribute ## Example The following sample generates CS0591: -``` +```csharp // CS0591.cs using System; diff --git a/docs/csharp/misc/cs0594.md b/docs/csharp/misc/cs0594.md index 1fb8470fa22fb..e0e1304c25452 100644 --- a/docs/csharp/misc/cs0594.md +++ b/docs/csharp/misc/cs0594.md @@ -21,7 +21,7 @@ Floating-point constant is outside the range of type 'type' The following sample generates CS0594: -``` +```csharp // CS0594.cs namespace MyNamespace { diff --git a/docs/csharp/misc/cs0596.md b/docs/csharp/misc/cs0596.md index b0b9a4f3c7d16..b94001fbb8f5e 100644 --- a/docs/csharp/misc/cs0596.md +++ b/docs/csharp/misc/cs0596.md @@ -21,7 +21,7 @@ The Guid attribute must be specified with the ComImport attribute The following sample generates CS0596: -``` +```csharp // CS0596.cs using System.Runtime.InteropServices; diff --git a/docs/csharp/misc/cs0601.md b/docs/csharp/misc/cs0601.md index d9f1ae91807d5..4d16223e4d122 100644 --- a/docs/csharp/misc/cs0601.md +++ b/docs/csharp/misc/cs0601.md @@ -21,7 +21,7 @@ The DllImport attribute must be specified on a method marked 'static' and 'exter The following sample generates CS0601: -``` +```csharp // CS0601.cs using System.Runtime.InteropServices; using System.Text; diff --git a/docs/csharp/misc/cs0609.md b/docs/csharp/misc/cs0609.md index a0ea65c6e8c52..f28c7455382f1 100644 --- a/docs/csharp/misc/cs0609.md +++ b/docs/csharp/misc/cs0609.md @@ -21,7 +21,7 @@ Cannot set the IndexerName attribute on an indexer marked override The following sample generates CS0609: -``` +```csharp // CS0609.cs using System; using System.Runtime.CompilerServices; diff --git a/docs/csharp/misc/cs0610.md b/docs/csharp/misc/cs0610.md index c74f40e314b02..ecaed90e4b6b5 100644 --- a/docs/csharp/misc/cs0610.md +++ b/docs/csharp/misc/cs0610.md @@ -21,7 +21,7 @@ Field or property cannot be of type 'type' The following sample generates CS0610 as a result of using **System.TypedReference** as a field: -``` +```csharp // CS0610.cs public class MainClass { diff --git a/docs/csharp/misc/cs0611.md b/docs/csharp/misc/cs0611.md index 88d02a2096283..e2e1864b3cbd3 100644 --- a/docs/csharp/misc/cs0611.md +++ b/docs/csharp/misc/cs0611.md @@ -21,7 +21,7 @@ Array elements cannot be of type 'type' The following sample generates CS0611 as a result of using **System.TypedReference** as an array element: -``` +```csharp // CS0611.cs public class a { diff --git a/docs/csharp/misc/cs0612.md b/docs/csharp/misc/cs0612.md index 9da6feb772378..78fa0954eb6b2 100644 --- a/docs/csharp/misc/cs0612.md +++ b/docs/csharp/misc/cs0612.md @@ -21,7 +21,7 @@ ms.author: "wiwagn" The following sample shows how accessing an obsolete member generates CS0612: -``` +```csharp // CS0612.cs // compile with: /W:1 using System; diff --git a/docs/csharp/misc/cs0617.md b/docs/csharp/misc/cs0617.md index fc2db34cfe5c1..4a60087fb9246 100644 --- a/docs/csharp/misc/cs0617.md +++ b/docs/csharp/misc/cs0617.md @@ -22,7 +22,7 @@ ms.author: "wiwagn" ## Example The following sample generates CS0617. -``` +```csharp // CS0617.cs using System; diff --git a/docs/csharp/misc/cs0619.md b/docs/csharp/misc/cs0619.md index 4a041b455e6b0..e717614e77388 100644 --- a/docs/csharp/misc/cs0619.md +++ b/docs/csharp/misc/cs0619.md @@ -21,7 +21,7 @@ ms.author: "wiwagn" The following sample generates CS0619: -``` +```csharp // CS0619.cs using System; diff --git a/docs/csharp/misc/cs0620.md b/docs/csharp/misc/cs0620.md index 1ba7cb93c8af9..dada882afde1d 100644 --- a/docs/csharp/misc/cs0620.md +++ b/docs/csharp/misc/cs0620.md @@ -21,7 +21,7 @@ Indexers cannot have void type The following sample generates CS0620: -``` +```csharp // CS0620.cs class MyClass { diff --git a/docs/csharp/misc/cs0621.md b/docs/csharp/misc/cs0621.md index 46c5330383579..8090cefd24506 100644 --- a/docs/csharp/misc/cs0621.md +++ b/docs/csharp/misc/cs0621.md @@ -21,7 +21,7 @@ ms.author: "wiwagn" The following sample generates CS0621: -``` +```csharp // CS0621.cs abstract class MyClass { diff --git a/docs/csharp/misc/cs0622.md b/docs/csharp/misc/cs0622.md index 79d675c3226a4..712c1ec1d39a2 100644 --- a/docs/csharp/misc/cs0622.md +++ b/docs/csharp/misc/cs0622.md @@ -22,7 +22,7 @@ Can only use array initializer expressions to assign to array types. Try using a ## Example The following sample generates CS0622: -``` +```csharp // CS0622.cs using System; diff --git a/docs/csharp/misc/cs0623.md b/docs/csharp/misc/cs0623.md index 2be66bc817f30..0d5eefd03643d 100644 --- a/docs/csharp/misc/cs0623.md +++ b/docs/csharp/misc/cs0623.md @@ -22,7 +22,7 @@ Array initializers can only be used in a variable or field initializer. Try usin ## Example The following example produces CS0623 because the compiler interprets the {4} as embedded array initializer inside the outer array initializer: -``` +```csharp //cs0632.cs using System; diff --git a/docs/csharp/misc/cs0628.md b/docs/csharp/misc/cs0628.md index 520dbf9a38ded..71a7d82f40ccf 100644 --- a/docs/csharp/misc/cs0628.md +++ b/docs/csharp/misc/cs0628.md @@ -21,7 +21,7 @@ ms.author: "wiwagn" The following sample generates CS0628: -``` +```csharp // CS0628.cs // compile with: /W:4 sealed class C