Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 7th, 2012  |  syntax: None  |  size: 0.87 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to write an inline big string in F#
  2. string myBigString = @"
  3.  
  4. <someXmlForInstance>
  5.   <someChild />
  6. </someXmlForInstance>
  7.  
  8. ";
  9.        
  10. let xaml = """
  11. <StackPanel xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  12.             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  13.             Name="mainPanel">
  14.   <Border BorderThickness="15.0" BorderBrush="Black">
  15.     <StackPanel Name="stackPanel1">
  16.       <TextBlock Text="Super BreakAway!" FontSize="24" HorizontalAlignment="Center" />
  17.       <TextBlock Text="written in F#, by Brian McNamara - press 'p' to pause"
  18.                  FontSize="12" HorizontalAlignment="Center" />
  19.       <Border BorderThickness="2.0" BorderBrush="Black">
  20.         <Canvas Name="canvas" Background="White" />
  21.       </Border>
  22.     </StackPanel>
  23.   </Border>
  24. </StackPanel>"""
  25.        
  26. let str1 = "abc
  27.      def"
  28. let str2 = "abc
  29.      def"