Click here to Skip to main content
15,889,281 members
Home / Discussions / C#
   

C#

 
QuestionHow to Monitor Button Event Handler of a Child Form from the Parent Form? Pin
Khoramdin20-Feb-07 17:12
Khoramdin20-Feb-07 17:12 
AnswerRe: How to Monitor Button Event Handler of a Child Form from the Parent Form? Pin
Christian Graus20-Feb-07 17:23
protectorChristian Graus20-Feb-07 17:23 
AnswerRe: How to Monitor Button Event Handler of a Child Form from the Parent Form? Pin
Jeeva Jose20-Feb-07 19:56
Jeeva Jose20-Feb-07 19:56 
QuestionAccessing a method from one project in another Pin
Darkness8420-Feb-07 15:41
Darkness8420-Feb-07 15:41 
AnswerRe: Accessing a method from one project in another Pin
NanaAM20-Feb-07 16:58
NanaAM20-Feb-07 16:58 
AnswerRe: Accessing a method from one project in another Pin
Ashvin Gunga20-Feb-07 19:05
Ashvin Gunga20-Feb-07 19:05 
AnswerRe: Accessing a method from one project in another Pin
Jeeva Jose20-Feb-07 20:03
Jeeva Jose20-Feb-07 20:03 
QuestionConverting Months into years. Pin
Skanless20-Feb-07 14:27
Skanless20-Feb-07 14:27 
I am trying to display then data that is captured in months to be shown as years. For example if someone have been with us for 18 months, I want to display it as 1.5 years. I have attempted to do so by writing the code below but to no avail. Any assistance will be greatly appreciated.

public static int YearsFromMonths(int months)
{
int evenMonths = (months /12);
int remainingMonths =(months % 12);
decimal fractionOfYear = Convert.ToDecimal(((remainingMonths) * .0833)/10);



if((months % 12) == 0)
{

return evenMonths;
}

else
{
return fractionOfYear;
}


Thanks.

Skan

If you knew it would not compile why didn't you tell me?!?!?!

AnswerRe: Converting Months into years. Pin
Christian Graus20-Feb-07 14:36
protectorChristian Graus20-Feb-07 14:36 
GeneralRe: Converting Months into years. Pin
Skanless20-Feb-07 16:00
Skanless20-Feb-07 16:00 
GeneralRe: Converting Months into years. Pin
Skanless21-Feb-07 5:21
Skanless21-Feb-07 5:21 
QuestionRe: Converting Months into years. Pin
Pratik Vasant Shah20-Feb-07 21:56
Pratik Vasant Shah20-Feb-07 21:56 
AnswerRe: Converting Months into years. Pin
Skanless21-Feb-07 5:20
Skanless21-Feb-07 5:20 
AnswerRe: Converting Months into years -This solved the issue. Pin
Skanless21-Feb-07 10:22
Skanless21-Feb-07 10:22 
QuestionReplace one character for another in a string Pin
kani9820-Feb-07 14:03
kani9820-Feb-07 14:03 
AnswerRe: Replace one character for another in a string Pin
Dave Kreskowiak20-Feb-07 14:06
mveDave Kreskowiak20-Feb-07 14:06 
GeneralRe: Replace one character for another in a string Pin
kani9820-Feb-07 14:17
kani9820-Feb-07 14:17 
GeneralRe: Replace one character for another in a string Pin
Christian Graus20-Feb-07 14:38
protectorChristian Graus20-Feb-07 14:38 
QuestionDesigner Customization challenge... Pin
@FrankDrebin@20-Feb-07 13:25
@FrankDrebin@20-Feb-07 13:25 
QuestionIntercepting Output from another application Pin
shatterstar645720-Feb-07 13:18
shatterstar645720-Feb-07 13:18 
AnswerRe: Intercepting Output from another application Pin
mike montagne20-Feb-07 13:21
mike montagne20-Feb-07 13:21 
AnswerRe: Intercepting Output from another application Pin
Dave Kreskowiak20-Feb-07 13:36
mveDave Kreskowiak20-Feb-07 13:36 
GeneralRe: Intercepting Output from another application Pin
shatterstar645720-Feb-07 18:19
shatterstar645720-Feb-07 18:19 
GeneralRe: Intercepting Output from another application Pin
Dave Kreskowiak21-Feb-07 4:25
mveDave Kreskowiak21-Feb-07 4:25 
Questiondetect a color using C++ Pin
ricardo montemayor20-Feb-07 13:03
ricardo montemayor20-Feb-07 13:03 

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.