Results 1 to 3 of 3

Thread: Assign method to string and instantiate the string from object

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Thumbs up Assign method to string and instantiate the string from object

    Hi friends,

    I have one doubt. I have two functions in single class.

    Now i create instance for the class ex class1 objrole = new class1();

    Public string getRole()
    {
    }
    Now i can get the method from object that is objrole.getRole();
    But i assign this function to string that is string S = getRole();
    What is my question is i can get the function using object ie objrole.getRole();

    can i get the string like objrole.s() ???? ie i can assign method to string.

    Hope yours reply.

    Thanks
    Failing to plan is Planning to fail

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Assign method to string and instantiate the string from object

    Will this help?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Assign method to string and instantiate the string from object

    Hey,

    I think Dee-U might be on the right lines with his link, but to be sure, I didn't really follow your question.

    Can you perhaps provide some more information?

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width