Click here to Skip to main content
15,881,089 members
Home / Discussions / C#
   

C#

 
QuestionHow to find if a particular file is loaded by processes Pin
Mushtaque Nizamani29-Apr-08 8:54
Mushtaque Nizamani29-Apr-08 8:54 
GeneralRe: How to find if a particular file is loaded by processes Pin
Giorgi Dalakishvili29-Apr-08 9:19
mentorGiorgi Dalakishvili29-Apr-08 9:19 
AnswerRe: How to find if a particular file is loaded by processes Pin
PIEBALDconsult29-Apr-08 13:47
mvePIEBALDconsult29-Apr-08 13:47 
GeneralRe: How to find if a particular file is loaded by processes Pin
Mushtaque Nizamani29-Apr-08 13:56
Mushtaque Nizamani29-Apr-08 13:56 
GeneralLAN TicTacToe Pin
Member 365210629-Apr-08 8:23
Member 365210629-Apr-08 8:23 
GeneralRe: LAN TicTacToe Pin
carbon_golem29-Apr-08 8:43
carbon_golem29-Apr-08 8:43 
GeneralAdvice on Matching data Pin
MumbleB29-Apr-08 8:19
MumbleB29-Apr-08 8:19 
GeneralRe: Advice on Matching data Pin
Jimmanuel29-Apr-08 9:38
Jimmanuel29-Apr-08 9:38 
I'd refactor the transformation code out of the button click handler into a separate routine that returns an appropriate string for the given input like:
private string TransformMyString(string inputStr)
{
    string retval = "";
    int pcode = 0;

    if (!int.TryParse(inputStr, out pcode))
    {
        retval = "Invalid Integer!";
    }
    else if ((pcode >= 4731) && (pcode <= 6499))
    {
        retval = "whatever";
    }
    // else if . . .

    return retval;
}

Then you can MessageBox.Show the return from the function of put it in a text box or do whatever else you need to do.



GeneralRadGrid, DataTable And Caption Problem Pin
KlimUser29-Apr-08 7:52
KlimUser29-Apr-08 7:52 
GeneralRe: RadGrid, DataTable And Caption Problem Pin
Bert delaVega29-Apr-08 8:17
Bert delaVega29-Apr-08 8:17 
GeneralRe: RadGrid, DataTable And Caption Problem Pin
KlimUser29-Apr-08 10:47
KlimUser29-Apr-08 10:47 
GeneralSomething basic Pin
Spykraft29-Apr-08 7:13
Spykraft29-Apr-08 7:13 
GeneralRe: Something basic Pin
PIEBALDconsult29-Apr-08 7:24
mvePIEBALDconsult29-Apr-08 7:24 
GeneralRe: Something basic Pin
carbon_golem29-Apr-08 7:28
carbon_golem29-Apr-08 7:28 
GeneralRe: Something basic Pin
PIEBALDconsult29-Apr-08 12:11
mvePIEBALDconsult29-Apr-08 12:11 
GeneralRe: Something basic Pin
Spykraft29-Apr-08 7:38
Spykraft29-Apr-08 7:38 
GeneralRe: Something basic Pin
carbon_golem29-Apr-08 8:06
carbon_golem29-Apr-08 8:06 
GeneralRe: Something basic Pin
Spykraft29-Apr-08 12:11
Spykraft29-Apr-08 12:11 
GeneralRe: Something basic Pin
carbon_golem29-Apr-08 16:59
carbon_golem29-Apr-08 16:59 
GeneralRe: Something basic Pin
PIEBALDconsult29-Apr-08 9:31
mvePIEBALDconsult29-Apr-08 9:31 
GeneralDatagridview and keyenter Pin
Canann29-Apr-08 4:43
Canann29-Apr-08 4:43 
QuestionRe: Datagridview and keyenter Pin
Canann30-Apr-08 2:51
Canann30-Apr-08 2:51 
QuestionHow to generate Typed DataSet with CodeDom ? Pin
hdv21229-Apr-08 3:03
hdv21229-Apr-08 3:03 
Generalanti-pattern in GC Pin
George_George29-Apr-08 2:59
George_George29-Apr-08 2:59 
GeneralRe: anti-pattern in GC Pin
Colin Angus Mackay29-Apr-08 4:03
Colin Angus Mackay29-Apr-08 4: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.