带有字符串插值的新行

时间:2019-04-29 20:06:25

标签: c#

我尝试在三个属性之间换行。但是我在属性之间没有换行

我当然用谷歌搜索了。但是我尝试使用Environmen.newLine和“ \ n”。但是这些都不行

library(data.table)
setDT(df)

df[, age_class := {
        start_ind <- match(orig_age_class[1], age_classes)
        n3 <- cumsum(Season == 3)
        age_classes[pmin(length(age_classes), n3 + start_ind)]}, 
   by = ID]

df
#     ID Season orig_age_class age_class
#  1:  1      1       New_Born  New_Born
#  2:  1      2           <NA>  New_Born
#  3:  1      3           <NA>  Yearling
#  4:  1      4           <NA>  Yearling
#  5:  1      1           <NA>  Yearling
#  6:  1      2           <NA>  Yearling
#  7:  1      3           <NA>     Adult
#  8:  1      4           <NA>     Adult
#  9:  1      1           <NA>     Adult
# 10:  1      2           <NA>     Adult

1 个答案:

答案 0 :(得分:2)

您可以使用$@来使用带内插的逐字字符串(保留新行)

$@"Email: {teacherCorrectionRequestDto.EmailAddress}
Telefoonnummer: {teacherCorrectionRequestDto.PhoneNumber}
Toelichting: {teacherCorrectionRequestDto.Explanation}"