Hello, I would like to know, How can I convert a positive number ( int type) to a negative number in C# and vice-versa ( negative to positive number using C#)?
...
Hi please I'm converting 12-hour AM/PM format, to military 24-hour time format using C# Console app.
Note: Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock. Noon is 12:00:00PM on a 12-hour clock, and 12:00:00 on a 24-hour clock.
My code is that :
...I am creating a C# console application for some test project, in which I need to get Root folder location (application path) of project, for example, if my project is in "C:\Project\Program.cs
", so i should get "C:\Project\
" drive as root location.
How can I get it using C# console application, in web-application we get it using Server.MapPath("~/")
but I am not sure about console application.
I have a string with numbers in it, for example here is the string "121 testing your City", now, I would like to extract only "121" from the string, how can I do that using C#?
...Hello, I would like to know how can I generate excel file in my C# project without installing Microsoft Excel/office or interop on server?Can you please provide me step by step guide or easy tutorial links, anything will work, thanks.
...How to encrypt and decrypt a string in C#? I would like to know simplest and efficient way for this using some example if possible, thanks
...