29 Replies
so how do i do it?
i hate console
I'm a WPF/WinForms guy but i needed a quicky
4900C11D4BC29D44 should be 4944321593800196169 if hex to ulong
and i want to convert it back
so if i do 4944321593800196169, it needs to be the original value of hex
ulong whatever = Console.ReadLine();
off to a good start with a error
hmm is it just me or dont the hex and decimal match anyway
it matches, its a uint4
4900C11D4BC29D44 = 5260416696337997124
no
uint64
im looking at the hex editor and thats the output
That I am aware
so this is a damn mess
This is why I stick to GUI's as I am not a cli guy
But it would be dumb to make a gui for 1 thing
gui or not you still need the same conversion
Represent Int64 as a Hexadecimal String in C#
Represent Int64 as a Hexadecimal String in C# - To represent Int64 as a Binary string in C#, use the ToString() method and set the base as the ToString() method ...
i even followed this
and its not working by example
of course for me uint64
UInt64 whatever = Console.ReadLine();
I JUST NEED THIS
Please help
well, readline returns a string, not a number
I only get a day to work on personal crap outside of my boring life š¦
did yo usee this?
yes but i need to convert it
hold then
sec
even to convert normal number string to ulong, you want
ulong.Parse
ulong.Parse(Console.ReadLine(), System.Globalization.NumberStyles.HexNumber);
better? š
think for a second... What is HexNumbers for? What kind of number string is coming from the console?!
well I want to put in a ulong value
and get a hexvalue string back
again, this is not something i know, I do art not this
I really need this quick and dirty, i dont care, i will pay
Im always stuck doing stupid shit and my pea brain isnt working today
adhd sucks
ok fine
ok got the -read string from console part
now to parse
sec

ok...
What am I missing ?
4944321593800196169
in hex editors its a uint64
which should be "4900C11D4BC29D44" if in 8 byte hex
and i have proof it is XD
ok then what do i do to fix this?
i am not making a app, its to convert
if a WEBSITE had a converter, ID USE IT
š
but im forced to make code
ok hold
how the hell is 4900C11D4BC29D44 base 10????
im gonna spend 5 goddamn hours
to just do 1 line
yes!
4900C11D4BC29D44 SHOULD be the output
yes aka DEC
decimal
var t = ulong.Parse(output, System.Globalization.NumberStyles.Integer);
ok hold
var t = ulong.Parse(output, System.Globalization.NumberStyles.Any);
better?
im gonna fucking smash my monitor if not
because i cant find a good example
ok
var outputUlong = ulong.Parse(output);
there š¦
i feel like a 3 year old could do this yet im a fucking idiot
thanks aging!

ok
1 min

Finally š
all this just to convert a damn ulong
you'd thing a website would have a converter
Decimal to Hexadecimal Converter
Decimal to hex number conversion calculator and how to convert.
liek this one ;)
FOR FUCK SAKES
i did all this for nothing then
also saw my error where i thought the values didnt match.. was in wrong endianess
yeah it's Big Endian š
welp, wrote a console app for nothing now XD
but gonna archive it if i need it again
On a Saturday?
yeah i googled for it
but couldn't find the right words to put in š
tbh after after noticed your short temper i didnt really wanted to help so waited till someone else chaimed in.. sry <3
sorry š¦
it wasnt your fault, im just sick of my failures, it's all i do in life
I don't even have a job, im on ssi