Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0192.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Fields of static readonly field 'name' cannot be passed ref or out (except in a
## Example
The following sample generates CS0192.

```
```csharp
// CS0192.cs
class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0193.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The * or -> operator must be applied to a pointer

The following sample generates CS0193:

```
```csharp
// CS0193.cs
using System;

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0196.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A pointer must be indexed by only one value

The following sample generates CS0196:

```
```csharp
// CS0196.cs
public class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0197.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Passing 'argument' as ref or out or taking its address may cause a runtime excep
## Example
The following sample generates CS0197.

```
```csharp
// CS0197.cs
// compile with: /W:1
class X : System.MarshalByRefObject
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0198.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Fields of static readonly field 'name' cannot be assigned to (except in a static

The following sample generates CS0198:

```
```csharp
// CS0198.cs
class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0199.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Fields of static readonly field 'name' cannot be passed ref or out (except in a
## Example
The following sample generates CS0199:

```
```csharp
// CS0199.cs
class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0200.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Property or indexer 'property' cannot be assigned to — it is read only
## Example
The following sample generates CS0200:

```
```csharp
// CS0200.cs
public class MainClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0202.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ foreach requires that the return type 'type' of 'type.GetEnumerator()' must have

The following sample generates CS0202:

```
```csharp
// CS0202.cs

public class C1
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0205.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Cannot call an abstract base member: 'method'

The following sample generates CS0205:

```
```csharp
// CS0205.cs
abstract public class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0206.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ A property or indexer may not be passed as an out or ref parameter
## Example
The following sample generates CS0206:

```
```csharp
// CS0206.cs
public class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0208.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Cannot take the address of, get the size of, or declare a pointer to a managed t
## Example
The following sample generates CS0208:

```
```csharp
// CS0208.cs
// compile with: /unsafe

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0209.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The type of local declared in a fixed statement must be a pointer type

The following sample generates CS0209:

```
```csharp
// CS0209.cs
// compile with: /unsafe

Expand Down
4 changes: 2 additions & 2 deletions docs/csharp/misc/cs0210.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You must provide an initializer in a fixed or using statement declaration

The following sample generates CS0210:

```
```csharp
// CS0210a.cs
// compile with: /unsafe

Expand Down Expand Up @@ -54,7 +54,7 @@ public class MyClass

The following sample also generates CS0210 because the [using statement](../../csharp/language-reference/keywords/using-statement.md) has no initializer.

```
```csharp
// CS0210b.cs

using System.IO;
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0211.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Cannot take the address of the given expression

The following sample generates CS0211:

```
```csharp
// CS0211.cs
// compile with: /unsafe

Expand Down
4 changes: 2 additions & 2 deletions docs/csharp/misc/cs0212.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You can only take the address of an unfixed expression inside of a fixed stateme

The following sample shows how to take the address of an unfixed expression. The following sample generates CS0212.

```
```csharp
// CS0212a.cs
// compile with: /unsafe /target:library

Expand All @@ -43,7 +43,7 @@ public class A {

The following sample also generates CS0212 and shows how to resolve the error:

```
```csharp
// CS0212b.cs
// compile with: /unsafe /target:library
using System;
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0213.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You cannot use the fixed statement to take the address of an already fixed expre
## Example
The following sample generates CS0213.

```
```csharp
// CS0213.cs
// compile with: /unsafe
public class MyClass
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0214.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Pointers and fixed size buffers may only be used in an unsafe context

The following sample generates CS0214:

```
```csharp
// CS0214.cs
// compile with: /target:library /unsafe
public struct S
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0215.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The return type of operator True or False must be bool

The following sample generates CS0215:

```
```csharp
// CS0215.cs
class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0216.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The operator 'operator' requires a matching operator 'missing_operator' to also

The following sample generates CS0216:

```
```csharp
// CS0216.cs
class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0217.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In order to be applicable as a short circuit operator a user-defined logical ope

The following sample generates CS0217:

```
```csharp
// CS0217.cs
using System;

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0218.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The type ('type') must contain declarations of operator true and operator false

The following sample generates CS0218:

```
```csharp
// CS0218.cs
using System;
public class MyClass
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0219.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The variable 'variable' is assigned but its value is never used

The following sample generates CS0219:

```
```csharp
// CS0219.cs
// compile with: /W:3
public class MyClass
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0220.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The operation overflows at compile time in checked mode

The following sample generates CS0220:

```
```csharp
// CS0220.cs
using System;

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0221.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Constant value 'value' cannot be converted to a 'type' (use 'unchecked' syntax t

The following sample generates CS0221:

```
```csharp
// CS0221.cs
public class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0225.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The params parameter must be a single dimensional array
## Example
The following sample generates CS0225:

```
```csharp
// CS0225.cs
public class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0226.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ An __arglist expression may only appear inside of a call or new expression.
## Example
The following code generates CS0226:

```
```csharp
// cs0226.cs
using System;

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0227.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Unsafe code may only appear if compiling with /unsafe

The following sample, when compiled without **/unsafe**, will generate CS0227:

```
```csharp
// CS0227.cs
public class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0230.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Type and identifier are both required in a foreach statement

The following sample generates CS0230:

```
```csharp
// CS0230.cs
using System;

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0231.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A params parameter must be the last parameter in a formal parameter list.

The following sample generates CS0231:

```
```csharp
// CS0231.cs
class Test
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0236.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A field initializer cannot reference the nonstatic field, method, or property 'f

The following sample generates CS0236:

```
```csharp
// CS0236.cs
public class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0238.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ms.author: "wiwagn"

The following sample generates CS0238:

```
```csharp
// CS0238.cs
abstract class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0239.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ms.author: "wiwagn"

The following sample generates CS0239:

```
```csharp
// CS0239.cs
abstract class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0241.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Default parameter specifiers are not permitted
## Example
The following sample generates CS0241. In addition, the sample shows how to simulate, with overloading, a method with default arguments.

```
```csharp
// CS0241.cs
public class A
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0242.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The operation in question is undefined on void pointers

The following sample generates CS0242:

```
```csharp
// CS0242.cs
// compile with: /unsafe
class TestClass
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0243.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The Conditional attribute is not valid on 'method' because it is an override met

The following sample generates CS0243:

```
```csharp
// CS0243.cs
// compile with: /target:library
public class MyClass
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0244.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Neither 'is' nor 'as' is valid on pointer types

The following sample generates CS0244:

```
```csharp
// CS0244.cs
// compile with: /unsafe

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0245.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Destructors and object.Finalize cannot be called directly. Consider calling IDis

The following sample generates CS0245:

```
```csharp
// CS0245.cs
using System;
using System.Collections;
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0247.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Cannot use a negative size with stackalloc

The following sample generates CS0247:

```
```csharp
// CS0247.cs
// compile with: /unsafe
public class MyClass
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0248.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Cannot create an array with a negative size
## Example
The following sample generates CS0248:

```
```csharp
// CS0248.cs
class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0249.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Do not override object.Finalize. Instead, provide a destructor.

The following sample generates CS0249:

```
```csharp
// CS0249.cs
class MyClass
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0250.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Do not directly call your base class Finalize method. It is called automatically

The following sample generates CS0250

```
```csharp
// CS0250.cs
class B
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0251.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Indexing an array with a negative index (array indices always start at zero)

The following sample generates CS0251:

```
```csharp
// CS0251.cs
// compile with: /W:2
class MyClass
Expand Down
Loading