0
点赞
收藏
分享

微信扫一扫

【图像分类】基于深度学习的中草药分类系统的设计与实现(ResNet网络,附代码和数据集)

infgrad 2023-11-28 阅读 35
wpf

在xaml里使用StringFormat,将两个字符串拼起来,一个字符串时固定不变的,一个字符串是动态绑定,如:平均密度:绑定的值

代码如下:

    <TextBlock Margin="0,0,0,0" Text="{Binding CellAverageDensity, StringFormat='{}平均密度:{0}'}" Style="{StaticResource TextBlockMediumStyle}" HorizontalAlignment="Left"/>

在cs里,用的是  String.Format方法

     string msg = String.Format("{0}  {1}  {2:x2} {3:x2} {4:x2} {5:x2} {6:x2} {7:x2} {8:x2} {9:x2}   to handle {10}",
                                             id, dlc, data[0], data[1], data[2], data[3], data[4],
                                             data[5], data[6], data[7], _handle);
举报

相关推荐

0 条评论