Re: newbie: string reference

From: Bruce Wood (brucewood_at_canada.com)
Date: 03/18/05

  • Next message: JV: "Re: iterating through a column on a datagrid"
    Date: 18 Mar 2005 13:49:32 -0800
    
    

    When you say

    string a;

    a _is_ a reference. Perhaps if you would give more information about
    what you hope to do with string references, we could give you more
    help.

    By the way, if what you want is to pass a string into a method, and
    upon return have it change to a different string, you can do this using
    ref:

    private void MyMethod(ref string x)
    {
        x = "Goodbye";
    }

    string a = "Hello";
    MyMethod(ref a);
    // At this point a will be "Goodbye".


  • Next message: JV: "Re: iterating through a column on a datagrid"

    Relevant Pages

    • Re: My First C# (warning - long post)
      ... public CodeStatistics(String csServerName, String csElementId) ... private void updateLocInTheCscsDatabase() ... linesOfGuiCode(clLine, ref commentStart, ref ... commentStart, ref String commentEnd, ref String commentSingle) ...
      (comp.lang.cobol)
    • Re: newbie: string reference
      ... Another point of note here that may be of importance to the original poster ... is that String is immutable -- the value of an instance never changes. ... > what you hope to do with string references, ...
      (microsoft.public.dotnet.languages.csharp)
    • C# Event Handlers For Dynamically Created DropDownLists
      ... Problem - when the user selection is extracted form the dropdownlists ... private void Page_Load ... private void btnLoadDb_Click(object sender, System.EventArgs e) ... string dbFileDestination = Path.Combine; ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: C# Retain PlaceHolder ViewState
      ... the dropdownlists. ... Object reference not set to an instance of an object. ... sourceControl, String eventArgument) ... private void Page_Load ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: how can I get url of page ASPNET C#
      ... public string UrlBaner ... protected HtmlGenericControl DivEuroAdresBaner; ... private void Page_Load ... flashParem += "English*http://www.euroadres.pl/zmienjezyk.aspx*2 |"; ...
      (microsoft.public.dotnet.framework.aspnet)