Re: How to assign a block of text to a string in C#

From: Bob Grommes (bob_at_bobgrommes.com)
Date: 05/08/04

  • Next message: Christopher Kimbell: "Re: interface question"
    Date: Sat, 8 May 2004 13:34:07 -0700
    
    

    No, there is no equivalent syntax in C#.

    --Bob

    "Richard Frenkel" <newsgroup@frenkelfamily.org> wrote in message
    news:7e94523.0405081001.7392cceb@posting.google.com...
    > I'd like to embed a bunch of text in a c# source file and assign it to
    > a string.
    > something like:
    >
    > ----------------------------
    > string x = <<eof
    >
    > This is a bunch of text
    > that is assigned to string x
    > until the "eof" on a line
    > by itself is encountered.
    >
    > eof
    > -------------------------------
    >
    > of course anyone using Perl will recongize this very convenient
    > syntax. Otherwise one has to go thru:
    >
    > x = 'blah blah';
    > x += 'more blah blah";
    > etc which is tedious. Just adding all the quotes is tedious. And if
    > there are quotes in the text block it's even MORE tedious, and tedium
    > is something I don't care for as a programer. So is there a way to do
    > this in the C# compiler?


  • Next message: Christopher Kimbell: "Re: interface question"

    Relevant Pages

    • Re: How to assign a block of text to a string in C#
      ... Also if it comes down to it you could right a very basic program that auto ... >This is a bunch of text ... >that is assigned to string x ... Just adding all the quotes is tedious. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: How to assign a block of text to a string in C#
      ... >> a string. ... >> This is a bunch of text ... Just adding all the quotes is tedious. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: A Logical Model for Lists as Relations
      ... I am aware of the difference between the number zero and an empty list. ... contents of a set - yields a bunch, which also has a comma union ... is a string of length 4. ... Empty strings and empty lists? ...
      (comp.databases.theory)
    • Re: Retractions
      ... about how the quotes about me somehow are of more importance and the ones ... backing up my point about you padding your "bunch". ... No, Steve, you are in no position to insist I do a thing. ... website was clearly another of your lies. ...
      (comp.sys.mac.advocacy)
    • Convert String to Float if and only if the content of the string are digits
      ... Long time reader -- first time poster. ... if the contents of that string are a bunch of digits. ... newData = Array.new ...
      (comp.lang.ruby)