Welcome to collectivesolver - Programming & Software Q&A with Examples. A website you can trust. All programs tested and work.

Contact: aviboots(AT)netvision.net.il


Instant Grammar Checker - Correct all grammar errors and enhance your writing

Teach Your Child To Read

Dental Dog Chews
FRESH BREATHIES

GlucoTrust is a brand new, science-backed supplement that supports healthy blood sugar levels AND weight loss for men and women

Everything you need to sell anywhere

Managed VPS Hosting
Affordable. Secure. Your Own Virtual Private Hosting. Faster than AWS and Rackspace

Bonsai Boy of New York Bonsai Trees and Accessories
100%

Disclosure We are a professional Programming & Software Q&A website, that receives compensation from some of the links whose we show you with Information. It means that my content may contain affiliate links.

24,887 questions

32,502 answers

573 users

How to separate groups of digits in numeric literals with underscore in C#

4 Answers

0 votes
using System;

public class Program
{
	public static void Main(string[] args)
	{
		long creditCardNumber = 1234_5678_9101_1129L;
		
		Console.WriteLine("Credit Card Number: " + creditCardNumber);
	}
}



/*
run:
  
Credit Card Number: 1234567891011129
  
*/

 




answered 6 days ago by avibootz
0 votes
using System;

public class Program
{
	public static void Main(string[] args)
	{
		float pi =  3.14_15_92F;
         
        Console.WriteLine("PI: " + pi);
	}
}



/*
run:
  
PI: 3.141592
  
*/

 




answered 6 days ago by avibootz
0 votes
using System;

public class Program
{
	public static void Main(string[] args)
	{
		long hexLong = 0x5F_3A_DE_BD;
         
        Console.WriteLine("Hex long: " + hexLong);
	}
}



/*
run:
  
Hex long: 1597693629
  
*/

 




answered 6 days ago by avibootz
0 votes
using System;

public class Program
{
	public static void Main(string[] args)
	{
		byte binByte = 0b0010_0111;
         
        Console.WriteLine("binByte: " + binByte);
	}
}



/*
run:
  
binByte: 39
  
*/

 




answered 6 days ago by avibootz
...