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/cs0713.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Static class 'static type' cannot derive from type 'type'. Static classes must d

The following sample generates CS0713:

```
```csharp
// CS0713.cs
public class Base
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0714.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ms.author: "wiwagn"
## Example
The following sample generates CS0714:

```
```csharp
// CS0714.cs
interface I
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0715.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ms.author: "wiwagn"

The following sample generates CS0715:

```
```csharp
// CS0715.cs
public static class C
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0716.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Cannot convert to static type 'type'
## Example
The following sample generates CS0716:

```
```csharp
// CS0716.cs

public static class SC
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0717.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ms.author: "wiwagn"
## Example
The following sample generates CS0717:

```
```csharp
// CS0717.cs

public static class SC
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0718.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ms.author: "wiwagn"
## Example
The following sample generates CS0718:

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

The following sample generates CS0719:

```
```csharp
// CS0719.cs
public static class SC
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0720.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ms.author: "wiwagn"
## Example
The following sample generates CS0720:

```
```csharp
// CS0720.cs

public static class Test
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0721.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ms.author: "wiwagn"

The following sample generates CS0721:

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

The following sample generates CS0722:

```
```csharp
// CS0722.cs
public static class SC
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0723.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Cannot declare variable of static type 'type'

The following sample generates CS0723:

```
```csharp
// CS0723.cs
public static class SC
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0724.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ does not need a CLSCompliant attribute because the assembly does not have a CLSC
## Example
The following example generates CS0724.

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

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0728.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Possibly incorrect assignment to local 'variable' which is the argument to a usi
## Example
The following code will generate warning CS0728.

```
```csharp
// CS0728.cs

using System;
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0729.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Type 'type' is defined in this assembly, but a type forwarder is specified for i
## Example
The following sample generates CS0729.

```
```csharp
// CS0729.cs
// compile with: /target:library
using System.Runtime.CompilerServices;
Expand Down
4 changes: 2 additions & 2 deletions docs/csharp/misc/cs0730.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Cannot forward type 'type' because it is a nested type of 'type'
## Example
The following sample generates CS0730. It consists of two source files. First, compile the library file `CS0730a.cs`, and the compile the file `CS0730.cs` referencing the library file.

```
```csharp
// CS0730a.cs
// compile with: /t:library
public class Outer
Expand All @@ -31,7 +31,7 @@ public class Outer
}
```

```
```csharp
// CS0730.cs
// compile with: /t:library /r:CS0730a.dll
using System.Runtime.CompilerServices;
Expand Down
4 changes: 2 additions & 2 deletions docs/csharp/misc/cs0733.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Cannot forward generic type, 'GenericType<>'
## Example
The following example generates CS0733. Compile the first file as a library, and then reference it when you compile the second file.

```
```csharp
// CS0733a.cs
// compile with: /target:library
public class GenericType<T>
{
}
```

```
```csharp
// CS0733.cs
// compile with: /target:library /r:CS0733a.dll
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(GenericType<int>))] // CS0733
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0734.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The /moduleassemblyname option may only be specified when building a target type
## Example
The following sample generates CS0734. To resolve, add **/target:module** to the compilation.

```
```csharp
// CS0734.cs
// compile with: /moduleassemblyname:A
// CS0734 expected
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0735.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Invalid type specified as an argument for TypeForwardedTo attribute

The following sample generates CS0735.

```
```csharp
// CS735.cs
// compile with: /target:library
using System.Runtime.CompilerServices;
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0736.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ms.author: "wiwagn"
## Example
The following code generates CS0736 because `Program.testMethod` is declared as static:

```
```csharp
// cs0736.cs
namespace CS0736
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0737.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ms.author: "wiwagn"
## Example
The following code generates CS0737:

```
```csharp
// cs0737.cs
interface ITest
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0738.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ms.author: "wiwagn"
## Example
The following code generates CS0738 because the class method returns `void` and the interface member of the same name returns `int`:

```
```csharp
using System;

interface ITest
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0739.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ms.author: "wiwagn"
## Example
The following code generates CS0739:

```
```csharp
// CS0739.cs
// CS0739
// Assume that a class Test is declared in a separate dll
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0742.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A query body must end with a select clause or a group clause
## Example
The following code generates CS0742:

```
```csharp
// cs0742.cs
using System.Linq;
public class Test
Expand Down
4 changes: 2 additions & 2 deletions docs/csharp/misc/cs0743.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Expected contextual keyword 'on'

The pattern for a `join` clause is `join`...`in`...`on`...`equals`, as shown in this example:

```
```csharp
var query = from x in array1
join y in array2 on x equals y
select x;
Expand All @@ -32,7 +32,7 @@ var query = from x in array1
## Example
The following code generates CS0743:

```
```csharp
// cs0743.cs
using System;
using System.Linq;
Expand Down
4 changes: 2 additions & 2 deletions docs/csharp/misc/cs0744.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Expected contextual keyword 'equals'

The pattern for a `join` clause is `join`...`in`...`on`...`equals`, as shown in this example:

```
```csharp
var query = from x in array1
join y in array2 on x equals y
select x;
Expand All @@ -32,7 +32,7 @@ var query = from x in array1
## Example
The following code generates CS0744:

```
```csharp
// cs0744.cs
using System;
using System.Linq;
Expand Down
6 changes: 3 additions & 3 deletions docs/csharp/misc/cs0745.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Expected contextual keyword 'by'

The pattern for the `group` clause is `group...by` followed by an optional `into`, as shown in the following example:

```
```csharp
string[] names = { "Bob", "Bill", "Jonetta", "Mary" };

var query = from name in names
Expand All @@ -28,7 +28,7 @@ var query = from name in names

or

```
```csharp
var query2 = from name in names
group name by name[0] into g
//...additional query clauses
Expand All @@ -41,7 +41,7 @@ var query2 = from name in names
## Example
The following code generates CS0745:

```
```csharp
// cs0745.cs
using System;
using System.Linq;
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0746.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Invalid anonymous type member declarator. Anonymous type members must be declare
## Example
The following code generates CS0746 in the declaration of `incorrect_1` and `incorrect_2`. The following declarations show two of the correct ways to declare an anonymous type.

```
```csharp
// cs0746.cs
public class C
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0747.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Invalid initializer member declarator.
## Example
The following code generates CS0747:

```
```csharp
// cs0747.cs
using System.Collections.Generic;

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0748.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Inconsistent lambda parameter usage; all parameter types must either be explicit
## Example
The following code generates CS0748 because, in the lambda expression, only `alpha` is given an explicit type:

```
```csharp
// cs0748.cs
class CS0748
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0750.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A partial method cannot have access modifiers or the virtual, abstract, override
## Example
The following example generates CS0750:

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

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0751.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A partial method must be declared in a partial class or partial struct
## Example
The following example generates CS0751:

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

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0752.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A partial method cannot have out parameters
## Example
The following code generates CS0752:

```
```csharp
// cs0752.cs
public partial class C
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0753.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Only methods, classes, structs, or interfaces may be partial.
## Example
The following code generates CS0753:

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

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0754.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A partial method may not explicitly implement an interface method.
## Example
The following code generates CS0754:

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

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0755.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Both partial method declarations must be extension methods or neither may be an
## Example
The following example generates CS0755:

```
```csharp
// cs0755.cs
public static partial class Ext
{
Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0756.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ A partial method may not have multiple defining declarations.

## Example

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

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0757.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A partial method may not have multiple implementing declarations.
## Example
The following example generates CS0757:

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

Expand Down
2 changes: 1 addition & 1 deletion docs/csharp/misc/cs0758.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Both partial method declarations must use a params parameter or neither may use
## Example
The following code generates CS0758:

```
```csharp
using System;

public partial class C
Expand Down
Loading