Csharp/CSharp Tutorial/Language Basics/Variable Identifier

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

Demonstrate an @ identifier.

using System;  
   
class MainClass {   
  public static void Main() {   
    int @if; // use if as an identifier 
 
    for(@if = 0; @if < 10; @if++) 
      Console.WriteLine("@if is " + @if); 
  }   
}
@if is 0
@if is 1
@if is 2
@if is 3
@if is 4
@if is 5
@if is 6
@if is 7
@if is 8
@if is 9