C#删除“"来自"HelloWorld" [英] C# Remove "" from "HelloWorld"

查看:237
本文介绍了C#删除“"来自"HelloWorld"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
如何从"HelloWorld"中删除".

Hello ,
How to remove "" from "HelloWorld"

推荐答案

使用replace方法.
mystring是一个字符串变量,其中包含"Helloworld"
use replace method.
mystring is a string variable which contains "Helloworld"
mystring.Replace("\"", "");


以下是一些不同的示例:

Here are some different examples :

string str = """Helloworld""";
source.Substring(2, source.Length - 2);


string str = """Helloworld""";
string sub = input.Substring(2, 10);


string str = """Helloworld""";
str = str.Remove(0, 2);
str = str.Remove(test1.Length - 2, test1.Length - 1);

>


这篇关于C#删除“"来自"HelloWorld"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆