Click here to Skip to main content
14,665,437 members
Home » Discussions » C#
   

C#

 
GeneralRe: How to create the winform with code not by the guide (project-->add-->windows Form) at desgin-time in c#? Pin
mctramp1689-Jun-09 16:32
Membermctramp1689-Jun-09 16:32 
GeneralRe: How to create the winform with code not by the guide (project-->add-->windows Form) at desgin-time in c#? Pin
Christian Graus9-Jun-09 17:09
mveChristian Graus9-Jun-09 17:09 
QuestionHow to cast to a type stored in a field Pin
redivider9-Jun-09 12:20
Memberredivider9-Jun-09 12:20 
AnswerRe: How to cast to a type stored in a field Pin
Christian Graus9-Jun-09 12:40
mveChristian Graus9-Jun-09 12:40 
AnswerRe: How to cast to a type stored in a field Pin
Nooner9-Jun-09 14:43
MemberNooner9-Jun-09 14:43 
AnswerRe: How to cast to a type stored in a field Pin
Thomas Weller9-Jun-09 16:08
MemberThomas Weller9-Jun-09 16:08 
GeneralRe: How to cast to a type stored in a field Pin
redivider10-Jun-09 6:49
Memberredivider10-Jun-09 6:49 
QuestionLetter from Number generator Pin
Nooner9-Jun-09 11:17
MemberNooner9-Jun-09 11:17 
Hey I'm looking for a bit of help for a generic letter (see code below) Generator.

The funciton takes a number and returns a String.

expected:
input output
----- ------
1 a
26 z
27 aa
28 ab
52 az
53 ba
54 bb
78 bz
79 ca
702 aaa
703 aab
704 aac
...

Here is the code I got so far:
public String getLetter(int? number)
{
    number -= 1;
    String letter = "";
    char[] lettersA = {
                         'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                         'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                         's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
                      };

    int size = number.Value % 26;
    int bigSize = number.Value % 676;
    int loop = (int)Math.Floor((decimal)(number.Value / 26));
    int bigLoop = (int)Math.Floor((decimal)(number.Value / 676));


    for (int i = 0; i < loop; i++)
    {
        letter += lettersA[i];
    }
    letter += lettersA[size];

    return letter;
}

Please respond if you have a solution.

Thank you,
Marc

Life is too short to program in Visual Basic.

AnswerRe: Letter from Number generator Pin
Christian Graus9-Jun-09 11:21
mveChristian Graus9-Jun-09 11:21 
GeneralRe: Letter from Number generator Pin
Nooner9-Jun-09 13:25
MemberNooner9-Jun-09 13:25 
GeneralRe: Letter from Number generator Pin
Christian Graus9-Jun-09 14:27
mveChristian Graus9-Jun-09 14:27 
QuestionConfig files Pin
CodingYoshi9-Jun-09 11:04
MemberCodingYoshi9-Jun-09 11:04 
AnswerRe: Config files Pin
Christian Graus9-Jun-09 11:14
mveChristian Graus9-Jun-09 11:14 
AnswerRe: Config files Pin
Dave Kreskowiak9-Jun-09 12:32
mveDave Kreskowiak9-Jun-09 12:32 
GeneralRe: Config files Pin
CodingYoshi9-Jun-09 17:22
MemberCodingYoshi9-Jun-09 17:22 
GeneralRe: Config files Pin
CodingYoshi10-Jun-09 3:49
MemberCodingYoshi10-Jun-09 3:49 
QuestionPrevious result of a method call is remembered. Is this related with JIT compiler? Pin
bin_bin19-Jun-09 10:31
Memberbin_bin19-Jun-09 10:31 
AnswerRe: Previous result of a method call is remembered. Is this related with JIT compiler? Pin
Christian Graus9-Jun-09 10:43
mveChristian Graus9-Jun-09 10:43 
GeneralRe: Previous result of a method call is remembered. Is this related with JIT compiler? Pin
bin_bin19-Jun-09 11:52
Memberbin_bin19-Jun-09 11:52 
GeneralRe: Previous result of a method call is remembered. Is this related with JIT compiler? Pin
Christian Graus9-Jun-09 12:09
mveChristian Graus9-Jun-09 12:09 
AnswerRe: Previous result of a method call is remembered. Is this related with JIT compiler? Pin
Dr.Walt Fair, PE9-Jun-09 11:58
professionalDr.Walt Fair, PE9-Jun-09 11:58 
QuestionSubmit a specific form in HTML page Pin
Fayu9-Jun-09 10:03
MemberFayu9-Jun-09 10:03 
Question3D point / 3 axis chart. Pin
amirbrb9-Jun-09 9:36
Memberamirbrb9-Jun-09 9:36 
AnswerRe: 3D point / 3 axis chart. Pin
Seraph_summer9-Jun-09 10:24
MemberSeraph_summer9-Jun-09 10:24 
GeneralRe: 3D point / 3 axis chart. Pin
amirbrb9-Jun-09 10:44
Memberamirbrb9-Jun-09 10:44 

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.