Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to print a variable in c# with text

string name = "John";
Console.WriteLine("His name is " + name);
// or
Console.WriteLine($"His name is {name}");
// or
Console.WriteLine("His name is ", name);
// or 
Console.WriteLine("His name is {0}", name);
Comment

how to print a variable in c#

using System;

namespace Simple
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("This is C#");
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to get the index of an element in a list in unity 5 
Csharp :: c# for loop last iteration 
Csharp :: unity 2d platformer movement script rigidbody 
Csharp :: asp net core send email async 
Csharp :: how to check if a number is prime or not c# 
Csharp :: how to make a enemy in unity 
Csharp :: can lightning strike the same place twice 
Csharp :: ik not working unity 
Csharp :: unity colllion not working 
Csharp :: use different database with entitymanagerfactory 
Csharp :: project programing languages in codecademy 
Csharp :: generate random string 
Html :: input tag no suggestions 
Html :: font awesome icon 6 cdn 
Html :: how to center text in svg 
Html :: html link to call phone number 
Html :: html bootstrap textarea 
Html :: Uncaught ReferenceError: jQuery is not defined 
Html :: page dans un nouvelle onglet html 
Html :: a href mail 
Html :: range in decimals html 
Html :: html inbed youtube 
Html :: button center bootstrap 
Html :: twig join 
Html :: how to comment out html 
Html :: how to add icon to custom page tab 
Html :: buton html href 
Html :: loop through htmlcollection 
Html :: html center body 
Html :: html form only accept zip folders 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =