Replace("<br/>", chr(10) Give Error 'chr' does not exist in the current context but works with two strings.

This answer I found here, but it seem to work for some and not for others,  am I missing some maybe a directive of something?

the code works if i use strings only but if i try to use the the chr(10)

string j = s.Replace("<br/>", chr(10));

I get error:
The name 'chr' does not exist in the current context


Thanks for any help!
bmanmike39Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
Chr() is a legacy VB function so it will work in VB.Net apps...
You should be able to use the newline escape sequence of "\n":
    string j = s.Replace("<br/>", "\n");
0
All Courses

From novice to tech pro — start learning today.