Click here to Skip to main content
15,921,941 members
Home / Discussions / C#
   

C#

 
AnswerRe: marshalling linked list Pin
DaveyM6922-Jan-10 23:16
professionalDaveyM6922-Jan-10 23:16 
QuestionPopulating a Treeview from a dataset in c# Pin
tonyonlinux22-Jan-10 16:30
tonyonlinux22-Jan-10 16:30 
AnswerRe: Populating a Treeview from a dataset in c# Pin
Anurag Gandhi22-Jan-10 17:23
professionalAnurag Gandhi22-Jan-10 17:23 
GeneralRe: Populating a Treeview from a dataset in c# Pin
tonyonlinux22-Jan-10 18:00
tonyonlinux22-Jan-10 18:00 
GeneralRe: Populating a Treeview from a dataset in c# Pin
Anurag Gandhi23-Jan-10 7:43
professionalAnurag Gandhi23-Jan-10 7:43 
QuestionRe: Populating a Treeview from a dataset in c# Pin
tonyonlinux23-Jan-10 10:07
tonyonlinux23-Jan-10 10:07 
QuestionCreating ASP.NET server control with design-time capabilities Pin
[DK]KiloDunse22-Jan-10 11:04
[DK]KiloDunse22-Jan-10 11:04 
AnswerRe: Creating ASP.NET server control with design-time capabilities Pin
Not Active22-Jan-10 11:11
mentorNot Active22-Jan-10 11:11 
GeneralRe: Creating ASP.NET server control with design-time capabilities Pin
[DK]KiloDunse22-Jan-10 11:16
[DK]KiloDunse22-Jan-10 11:16 
GeneralRe: Creating ASP.NET server control with design-time capabilities Pin
Not Active22-Jan-10 11:28
mentorNot Active22-Jan-10 11:28 
AnswerRe: Creating ASP.NET server control with design-time capabilities Pin
[DK]KiloDunse22-Jan-10 15:54
[DK]KiloDunse22-Jan-10 15:54 
QuestionINotifyPropertyChanged, attributes and notification cascade Pin
N4sh22-Jan-10 9:15
N4sh22-Jan-10 9:15 
Questionhow to split input integer variable Pin
arungracy22-Jan-10 9:15
arungracy22-Jan-10 9:15 
AnswerRe: how to split input integer variable Pin
loyal ginger22-Jan-10 9:22
loyal ginger22-Jan-10 9:22 
GeneralRe: how to split input integer variable Pin
Som Shekhar22-Jan-10 9:39
Som Shekhar22-Jan-10 9:39 
AnswerRe: how to split input integer variable Pin
#realJSOP22-Jan-10 10:23
professional#realJSOP22-Jan-10 10:23 
GeneralRe: how to split input integer variable Pin
Luc Pattyn22-Jan-10 10:46
sitebuilderLuc Pattyn22-Jan-10 10:46 
GeneralRe: how to split input integer variable Pin
#realJSOP22-Jan-10 11:05
professional#realJSOP22-Jan-10 11:05 
AnswerRe: how to split input integer variable [modified] Pin
#realJSOP22-Jan-10 10:36
professional#realJSOP22-Jan-10 10:36 
GeneralRe: how to split input integer variable [modified] Pin
Luc Pattyn22-Jan-10 11:32
sitebuilderLuc Pattyn22-Jan-10 11:32 
GeneralRe: how to split input integer variable Pin
#realJSOP22-Jan-10 12:46
professional#realJSOP22-Jan-10 12:46 
AnswerRe: how to split input integer variable [modified] Pin
#realJSOP23-Jan-10 2:16
professional#realJSOP23-Jan-10 2:16 
AnswerRe: how to split input integer variable Pin
#realJSOP23-Jan-10 5:04
professional#realJSOP23-Jan-10 5:04 
And finally, the pointless math exercise extracting the digits from left to right instead of right to left.

bool isNegative = (value < 0);
List<int> digits = new List<int>();
int value = int.MinValue;
double i = 9;
double power = 0;
while (value != 0)
{
    power = Math.Pow(10d, i);
    int result = (value - (value % (int)power));
    int addResult = (int)((double)result / power) * ((isNegative && (int)i == 9) ? 1 : -1);
    digits.Add(addResult);
    value -= result;
    i--;
}


I hope you can see by my persistence that I've found several similar ways to accomplish the stated goal. This is part of what makes a good programmer.

.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

Questionget data from SSRS report Pin
Mohamed El-Wehishy22-Jan-10 7:20
Mohamed El-Wehishy22-Jan-10 7:20 
QuestionA Dialog bug (Edited) Pin
Muammar©22-Jan-10 7:04
Muammar©22-Jan-10 7:04 

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.