Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display 1000 separator in C# Visual Studio debugger

When working with big numbers, especially long, it's a must to display them with 1000 separators.

Is there a way to display those separators?

Inside the watch window?

Watch window example

When hovering over a variable?

Hovering example

like image 582
user276648 Avatar asked Sep 21 '25 01:09

user276648


1 Answers

it's technically possible but not straightforward. Your easiest way would be to create a 2nd formatted variable and watch that instead.

The only way i know of to do this in the watch window is you can actually "watch" an expression by typing it in the watch window as an edit to the variable. The expression would append a formatted toString. This doesn't seem to work with arrays though.

Say however you had a variable "total". your watch would say total and you would double click on it and edit it to say total.ToString("C");

I hope this helps.

like image 80
John Lord Avatar answered Sep 22 '25 14:09

John Lord