简体   繁体   English

c#将数据写入rtf文件

[英]c# Write data to an rtf file

I am trying to write data to an RTF file and set certain characters to a different color. 我正在尝试将数据写入RTF文件,并将某些字符设置为不同的颜色。 I found out how to do it in a box but I can't figure out how to write it to a file. 我发现了如何在一个盒子里做它,但是我不知道如何把它写到一个文件中。

If by "do it on a box" you mean RichTextBox you can use the RichTextBox.SaveFile() mothod. 如果“在盒子上做”是指RichTextBox ,则可以使用RichTextBox.SaveFile()方法。
Take a look here . 在这里看看。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM