Skip to content

Commit

Permalink
Commit translated content
Browse files Browse the repository at this point in the history
  • Loading branch information
olprod committed Nov 30, 2017
1 parent 414cb66 commit 032478f
Show file tree
Hide file tree
Showing 375 changed files with 18,636 additions and 9,503 deletions.
81 changes: 59 additions & 22 deletions docs/csharp/misc/cs0072.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,66 @@
---
title: "コンパイラ エラー CS0072 | Microsoft Docs"
ms.date: "2015-07-20"
ms.prod: ".net"
ms.technology:
- "devlang-csharp"
ms.topic: "article"
f1_keywords:
- "CS0072"
dev_langs:
- "CSharp"
helpviewer_keywords:
- "CS0072"
---
title: "コンパイラ エラー CS0072"
ms.date: 07/20/2015
ms.prod: .net
ms.technology: devlang-csharp
ms.topic: article
f1_keywords: CS0072
helpviewer_keywords: CS0072
ms.assetid: 9153cd52-f497-4128-a11f-a2820218b0e6
caps.latest.revision: 8
author: "BillWagner"
ms.author: "wiwagn"
caps.handback.revision: 8
---
# コンパイラ エラー CS0072
caps.latest.revision: "8"
author: BillWagner
ms.author: wiwagn
ms.openlocfilehash: c556a92cb5b926796ac95068db384b0a74252266
ms.sourcegitcommit: bd1ef61f4bb794b25383d3d72e71041a5ced172e
ms.translationtype: MT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/18/2017
---
# <a name="compiler-error-cs0072"></a>コンパイラ エラー CS0072
'event' : オーバーライドできません。'method' はイベントではありません

[イベント](../../csharp/language-reference/keywords/event.md)は別のイベントのみをオーバーライドできます。 詳細については、「[イベント](../../csharp/programming-guide/events/index.md)」を参照してください。
[イベント](../../csharp/language-reference/keywords/event.md) は別のイベントのみをオーバーライドできます。 詳細については、「[イベント](../../csharp/programming-guide/events/index.md)」を参照してください。

次の例では CS0072 が生成されます。

```
// CS0072.cs delegate void MyDelegate(); class Test1 { public virtual event MyDelegate MyEvent; public virtual void VMeth() { } public void FireAway() { if (MyEvent != null) MyEvent(); } } class Test2 : Test1 { public override event MyDelegate VMeth // CS0072 // uncomment the following lines to resolve // public override event MyDelegate MyEvent { add { VMeth += value; // MyEvent += value; } remove { VMeth -= value; // MyEvent -= value; } } public static void Main() { } }
```
// CS0072.cs
delegate void MyDelegate();
class Test1
{
public virtual event MyDelegate MyEvent;
public virtual void VMeth()
{
}
public void FireAway()
{
if (MyEvent != null)
MyEvent();
}
}
class Test2 : Test1
{
public override event MyDelegate VMeth // CS0072
// uncomment the following lines to resolve
// public override event MyDelegate MyEvent
{
add
{
VMeth += value;
// MyEvent += value;
}
remove
{
VMeth -= value;
// MyEvent -= value;
}
}
public static void Main()
{
}
}
```
58 changes: 37 additions & 21 deletions docs/csharp/misc/cs0078.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,45 @@
---
title: "コンパイラの警告 (レベル 4) CS0078 | Microsoft Docs"
ms.date: "2015-07-20"
ms.prod: ".net"
ms.technology:
- "devlang-csharp"
ms.topic: "article"
f1_keywords:
- "CS0078"
dev_langs:
- "CSharp"
helpviewer_keywords:
- "CS0078"
---
title: "コンパイラの警告 (レベル 4) CS0078"
ms.date: 07/20/2015
ms.prod: .net
ms.technology: devlang-csharp
ms.topic: article
f1_keywords: CS0078
helpviewer_keywords: CS0078
ms.assetid: 8d637be6-82bc-462c-bec5-217327bc8c40
caps.latest.revision: 6
author: "BillWagner"
ms.author: "wiwagn"
caps.handback.revision: 6
---
# コンパイラの警告 (レベル 4) CS0078
caps.latest.revision: "6"
author: BillWagner
ms.author: wiwagn
ms.openlocfilehash: b9db263df282606b4c9602d894db11fd3aad44d1
ms.sourcegitcommit: bd1ef61f4bb794b25383d3d72e71041a5ced172e
ms.translationtype: MT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/18/2017
---
# <a name="compiler-warning-level-4-cs0078"></a>コンパイラの警告 (レベル 4) CS0078
'l' と 数字の '1' との混同を避けるため、'L' を使用してください。

大文字の L ではなく小文字の l を使用する long 型へのキャストを検出すると、コンパイラによって警告が出されます。

次の例では CS0078 が生成されます。

```
// CS0078.cs // compile with: /W:4 class test { public static void TestL(long i) { } public static void TestL(int i) { } public static void Main() { TestL(25l); // CS0078 // try the following line instead // TestL(25L); } }
```
// CS0078.cs
// compile with: /W:4
class test {
public static void TestL(long i)
{
}
public static void TestL(int i)
{
}
public static void Main()
{
TestL(25l); // CS0078
// try the following line instead
// TestL(25L);
}
}
```
50 changes: 15 additions & 35 deletions docs/csharp/misc/cs0157.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,25 @@
---
title: "コンパイラ エラー CS0157 |Microsoft ドキュメント"
ms.date: 2015-07-20
---
title: "コンパイラ エラー CS0157"
ms.date: 07/20/2015
ms.prod: .net
ms.technology:
- devlang-csharp
ms.technology: devlang-csharp
ms.topic: article
f1_keywords:
- CS0157
dev_langs:
- CSharp
helpviewer_keywords:
- CS0157
f1_keywords: CS0157
helpviewer_keywords: CS0157
ms.assetid: a5d9d506-81f8-47dd-85b6-85f8170bcbef
caps.latest.revision: 8
caps.latest.revision: "8"
author: BillWagner
ms.author: wiwagn
translation.priority.ht:
- de-de
- es-es
- fr-fr
- it-it
- ja-jp
- ko-kr
- ru-ru
- zh-cn
- zh-tw
translation.priority.mt:
- cs-cz
- pl-pl
- pt-br
- tr-tr
translationtype: Machine Translation
ms.sourcegitcommit: a06bd2a17f1d6c7308fa6337c866c1ca2e7281c0
ms.openlocfilehash: 6c6f6312e2dc6a01fca3c3dde6e365d58c700e98
ms.lasthandoff: 03/13/2017

---
ms.openlocfilehash: 7e9d98d8bb28e4a2c9191356e735c62e6bf23359
ms.sourcegitcommit: bd1ef61f4bb794b25383d3d72e71041a5ced172e
ms.translationtype: MT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/18/2017
---
# <a name="compiler-error-cs0157"></a>コンパイラ エラー CS0157
コントロールが finally 句の本体から出られません。

すべてのステートメントで、[最後に](../../csharp/language-reference/keywords/try-catch-finally.md)句を実行する必要があります。 詳細については、次を参照してください。[例外処理ステートメント](../../csharp/language-reference/keywords/exception-handling-statements.md)[例外と例外処理](../../csharp/programming-guide/exceptions/index.md)します
[finally](../../csharp/language-reference/keywords/try-catch-finally.md) 句のすべてのステートメントを実行する必要があります。 詳細については、次を参照してください。[例外処理ステートメント](../../csharp/language-reference/keywords/exception-handling-statements.md)[例外と例外処理](../../csharp/programming-guide/exceptions/index.md)です

次の例では CS0157 が生成されます。

Expand Down Expand Up @@ -67,4 +47,4 @@ namespace MyNamespace
}
}
}
```
```
65 changes: 43 additions & 22 deletions docs/csharp/misc/cs0612.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,50 @@
---
title: "コンパイラの警告 (レベル 1) CS0612 | Microsoft Docs"
ms.date: "2015-07-20"
ms.prod: ".net"
ms.technology:
- "devlang-csharp"
ms.topic: "article"
f1_keywords:
- "CS0612"
dev_langs:
- "CSharp"
helpviewer_keywords:
- "CS0612"
---
title: "コンパイラの警告 (レベル 1) CS0612"
ms.date: 07/20/2015
ms.prod: .net
ms.technology: devlang-csharp
ms.topic: article
f1_keywords: CS0612
helpviewer_keywords: CS0612
ms.assetid: 7695f3b7-ffef-43f7-83db-fc1a9e361f1a
caps.latest.revision: 7
author: "BillWagner"
ms.author: "wiwagn"
caps.handback.revision: 7
---
# コンパイラの警告 (レベル 1) CS0612
caps.latest.revision: "7"
author: BillWagner
ms.author: wiwagn
ms.openlocfilehash: 6e1f15411f47119f55015e305bca02c146e490f6
ms.sourcegitcommit: bd1ef61f4bb794b25383d3d72e71041a5ced172e
ms.translationtype: MT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/18/2017
---
# <a name="compiler-warning-level-1-cs0612"></a>コンパイラの警告 (レベル 1) CS0612
'member' は使用されなくなりました

クラス デザイナーによってメンバーが [Obsolete](http://msdn.microsoft.com/ja-jp/05e99cd0-bda6-4f79-a890-1ca093b4b488) 属性でマークされました。 つまり、クラスの将来のバージョンでこのメンバーがサポートされない可能性があります。
クラス デザイナーによってメンバーが [Obsolete](http://msdn.microsoft.com/en-us/05e99cd0-bda6-4f79-a890-1ca093b4b488) 属性でマークされました。 つまり、クラスの将来のバージョンでこのメンバーがサポートされない可能性があります。

次の例では、旧式のメンバーにアクセスするとどのように CS0612 が生成されるかを示しています。

```
// CS0612.cs // compile with: /W:1 using System; class MyClass { [Obsolete] public static void ObsoleteMethod() { } [Obsolete] public static int ObsoleteField; } class MainClass { static public void Main() { MyClass.ObsoleteMethod(); // CS0612 here: method is deprecated MyClass.ObsoleteField = 0; // CS0612 here: field is deprecated } }
```
// CS0612.cs
// compile with: /W:1
using System;
class MyClass
{
[Obsolete]
public static void ObsoleteMethod()
{
}
[Obsolete]
public static int ObsoleteField;
}
class MainClass
{
static public void Main()
{
MyClass.ObsoleteMethod(); // CS0612 here: method is deprecated
MyClass.ObsoleteField = 0; // CS0612 here: field is deprecated
}
}
```
54 changes: 30 additions & 24 deletions docs/csharp/misc/cs0694.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
---
title: "コンパイラ エラー CS0694 | Microsoft Docs"
ms.date: "2015-07-20"
ms.prod: ".net"
ms.technology:
- "devlang-csharp"
ms.topic: "article"
f1_keywords:
- "CS0694"
dev_langs:
- "CSharp"
helpviewer_keywords:
- "CS0694"
---
title: "コンパイラ エラー CS0694"
ms.date: 07/20/2015
ms.prod: .net
ms.technology: devlang-csharp
ms.topic: article
f1_keywords: CS0694
helpviewer_keywords: CS0694
ms.assetid: 048615e4-4599-4726-b5db-55322ccc936f
caps.latest.revision: 8
author: "BillWagner"
ms.author: "wiwagn"
caps.handback.revision: 8
---
# コンパイラ エラー CS0694
caps.latest.revision: "8"
author: BillWagner
ms.author: wiwagn
ms.openlocfilehash: 79acfefded58c4b6898f63d8b9c8b4d222911a9c
ms.sourcegitcommit: bd1ef61f4bb794b25383d3d72e71041a5ced172e
ms.translationtype: MT
ms.contentlocale: ja-JP
ms.lasthandoff: 10/18/2017
---
# <a name="compiler-error-cs0694"></a>コンパイラ エラー CS0694
型パラメーター 'identifier' には含んでいる型またはメソッドと同じ名前が付いています

型パラメーターの名前は、その型パラメーターを含む型またはメソッドの名前と同じにすることはできないため、型パラメーターに別の名前を使用する必要があります。

## 使用例
## <a name="example"></a>例
次の例では CS0694 が生成されます。

```
// CS0694.cs // compile with: /target:library class C<C> {} // CS0694
// CS0694.cs
// compile with: /target:library
class C<C> {} // CS0694
```

## 使用例
## <a name="example"></a>例
ジェネリック クラスを含む上記のケースに加えて、次のメソッドでも、このエラーが発生する可能性があります。

```
// CS0694_2.cs // compile with: /target:library class A { public void F<F>(F arg); // CS0694 }
```
// CS0694_2.cs
// compile with: /target:library
class A
{
public void F<F>(F arg); // CS0694
}
```
Loading

0 comments on commit 032478f

Please sign in to comment.