Forum Xamarin.Android

how to add new line in string.Format in xamarin android

hi had issue regarding the string.format, i'm trying to add new line to my code -->

string sample = "test";
Property = string.Format("{0} {1}", count(), sample);

so that property will bind to a image button displaying integer count + string sample but i want to add newline in between

i tried \n, \r\n,etc... but i'm unable to add new line in between

Answers

  • ChristopheBERNARDChristopheBERNARD BEMember ✭✭✭✭✭

    Hello @rahulreddy try perhpas environnement.newLine
    I've try on a button and it's work well

    string.Format("TEXT FIRST LINE {0} {1}", System.Environment.NewLine, "NEW LINE TEXT");

Sign In or Register to comment.