How can I make an integer negative in C #?
abc = 5645307; // how to make abc -5645307 ?
Maybe I missed something:
abc = -abc;
If you want it to be negative, whether it was negative in advance or not, you should use:
abc = -Math.Abs(abc);
Here is how you can convert your value to minus value in C #
abc = abc > 0 ? abc*(-1) : abc;
What about....
xyz = Math.Abs(xyz) * (-1)
Source: https://habr.com/ru/post/1310731/More articles:How to automatically back up TFS 2010 - tfsApache Camel ESB for C # and Java EDA - c #Web Workers - How Do They Work? - javascriptreliable way to get ffmpeg to BASH conversion progress - bashStreaming audio to mobile phones, which technology to use? - androidDDD and IOC containers - c #Sorting a string in an array, making it sparsely populated - c ++Unable to view GWT 2.0.1 application in IE8 - internet-explorer-8Open Office Spellchecker / Java API - javaWPF Radio button does not appear on toolbar - radio-buttonAll Articles