locked
How read text from DLL !? RRS feed

  • Question

  • This is a DLL Code !

    using System;
    using System.Collections.Generic;
    using System.Text;

    namespace Loading_text
    {
        public class Main_Page
        {
            public void text(string form_text)       
            {            
                if (form_text == "App For Chat is updating ...")
                {
                    form_text = "App For Chat is updating .";
                }
                else if (form_text == "App For Chat is updating .")
                {
                    form_text = "App For Chat is updating ..";
                }
                else if (form_text=="App For Chat is updating ..")
                {
                    form_text = "App For Chat is updating ...";
                }
            }
        }
    }

      OK ?

     How Read (form_text) ?


    send me ~

    Monday, December 17, 2012 11:40 AM

Answers

  • E.g. you need to modify the methods parameter:

    public class Main_Page
    {
      public void text(ref string form_text)  { .. }
    }
    

    and your calling code should look like this:

    Loading_text.Main_Page mainPage = new Loading_text.Main_Page();
    
    string test = "App For Chat is updating ...";
    mainPage(ref test);
    Console.WriteLine(test);
    

    The problem is that your sample makes not that much sense. What do you like to do exactly?

    • Marked as answer by Milad Zohravi Monday, December 17, 2012 1:42 PM
    Monday, December 17, 2012 12:03 PM

All replies

  • you can pass the form_text as ref like as:

     public void text(ref string form_text)       


    Hirendra Sisodiya from authorcode.com

    Monday, December 17, 2012 11:56 AM
  • E.g. you need to modify the methods parameter:

    public class Main_Page
    {
      public void text(ref string form_text)  { .. }
    }
    

    and your calling code should look like this:

    Loading_text.Main_Page mainPage = new Loading_text.Main_Page();
    
    string test = "App For Chat is updating ...";
    mainPage(ref test);
    Console.WriteLine(test);
    

    The problem is that your sample makes not that much sense. What do you like to do exactly?

    • Marked as answer by Milad Zohravi Monday, December 17, 2012 1:42 PM
    Monday, December 17, 2012 12:03 PM
  • namespace Loading_text
     {
         public class Main_Page
         {
             public string text(string form_text)       
             {            
                 if (form_text == "App For Chat is updating ...")
                 {
                     form_text = "App For Chat is updating .";
                 }
                 else if (form_text == "App For Chat is updating .")
                 {
                     form_text = "App For Chat is updating ..";
                 }
                 else if (form_text=="App For Chat is updating ..")
                 {
                     form_text = "App For Chat is updating ...";
                 }
    		return form_text;
             }
         }
     }
    What is problem in this code ?

    One good question is equivalent to ten best answers.

    Monday, December 17, 2012 12:04 PM
  • Thank YOU ! 

    send me ~

    Monday, December 17, 2012 1:27 PM
  • Thanks !

    send me ~

    Monday, December 17, 2012 1:28 PM