Demonstrate an @ identifier. : Variable Identifier : Language Basics C# Examples


C# Examples » Language Basics » Variable Identifier »

 

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);  
    }      
}
    
   
  
   



Output

@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


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Language Basics
» Variable Identifier