Click here to Skip to main content
15,891,372 members
Home / Discussions / C#
   

C#

 
GeneralRe: Convert String To Unix Timestamp Pin
iNutR5-Aug-09 1:47
iNutR5-Aug-09 1:47 
GeneralRe: Convert String To Unix Timestamp Pin
Michael Bookatz5-Aug-09 2:36
Michael Bookatz5-Aug-09 2:36 
AnswerRe: Convert String To Unix Timestamp Pin
Luc Pattyn5-Aug-09 4:26
sitebuilderLuc Pattyn5-Aug-09 4:26 
Questionsocket disconnection Pin
Vivek Vijayan5-Aug-09 0:23
Vivek Vijayan5-Aug-09 0:23 
AnswerRe: socket disconnection Pin
Christian Graus5-Aug-09 1:07
protectorChristian Graus5-Aug-09 1:07 
GeneralRe: socket disconnection Pin
Vivek Vijayan5-Aug-09 3:50
Vivek Vijayan5-Aug-09 3:50 
GeneralRe: socket disconnection Pin
kstls5-Aug-09 5:40
kstls5-Aug-09 5:40 
QuestionStore uint value in int [solved] Pin
Xmen Real 4-Aug-09 23:49
professional Xmen Real 4-Aug-09 23:49 
I'm trying to convert an uint value to int, but it always raise overflow exception as it should. Actually, I'm hashing the url and saving an int value in SQL, since the hashed value is in uint and SQL do not support uint in DB so I've to convert it to int. Using bigint is also a way to go but space does matter in there. So I'm just wondering that is there any way to do that...?




Edited :
Okay, I got an idea... Wink | ;)

uint ToUInt(int value)
{
    return value < 0 ? (uint)(int.MaxValue - value) : (uint)value;
}
int ToInt(uint value)
{
    return value > int.MaxValue ? (int)(int.MaxValue - value) : (int)value;
}




TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia>

-----------------------------------------------
128 bit encrypted signature, crack if you can

modified on Wednesday, August 5, 2009 5:55 AM

AnswerRe: Store uint value in int [solved] Pin
Super Lloyd5-Aug-09 0:12
Super Lloyd5-Aug-09 0:12 
GeneralRe: Store uint value in int [solved] Pin
Xmen Real 5-Aug-09 0:25
professional Xmen Real 5-Aug-09 0:25 
QuestionArrays Pin
Bandisto4-Aug-09 23:37
Bandisto4-Aug-09 23:37 
AnswerRe: Arrays Pin
SeMartens4-Aug-09 23:41
SeMartens4-Aug-09 23:41 
AnswerRe: Arrays Pin
Luc Pattyn4-Aug-09 23:41
sitebuilderLuc Pattyn4-Aug-09 23:41 
AnswerRe: Arrays Pin
stancrm4-Aug-09 23:43
stancrm4-Aug-09 23:43 
QuestionUnhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Cracked-Down4-Aug-09 23:20
Cracked-Down4-Aug-09 23:20 
AnswerRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Christian Graus4-Aug-09 23:26
protectorChristian Graus4-Aug-09 23:26 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Cracked-Down4-Aug-09 23:53
Cracked-Down4-Aug-09 23:53 
AnswerRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Luc Pattyn4-Aug-09 23:44
sitebuilderLuc Pattyn4-Aug-09 23:44 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Christian Graus4-Aug-09 23:46
protectorChristian Graus4-Aug-09 23:46 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Cracked-Down5-Aug-09 0:05
Cracked-Down5-Aug-09 0:05 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Christian Graus5-Aug-09 0:17
protectorChristian Graus5-Aug-09 0:17 
AnswerRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Moreno Airoldi5-Aug-09 0:48
Moreno Airoldi5-Aug-09 0:48 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Cracked-Down5-Aug-09 1:03
Cracked-Down5-Aug-09 1:03 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Moreno Airoldi5-Aug-09 2:44
Moreno Airoldi5-Aug-09 2:44 
GeneralRe: Unhandled exceptions on Model Form remains unhandled in the release build even if the call to the model form is wrapped up in the try….catch{ } block!!!!!! Pin
Cracked-Down5-Aug-09 18:45
Cracked-Down5-Aug-09 18:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.