C#学习者 [英] C# Learner

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

问题描述

大家好,

我是c#学习者,

我想尝试下面的代码,*空格留空,但它没有用,

i want to try in below code , * astrstick repalce with space, but it ity didnot work, ,

它会遇到一些编译时错误,例如idedifer被摘录,请让我知道我哪里错了?

IT throe some compile time errors , like idetifer excetpted, Pls let me know where im wrong?

推荐答案

有些事情还没有完全达到标准……

There are several things not entirely up to par...

  • 您的方法replacen返回类型为"my"的对象.
  • 您的方法replacen需要一个参数,但尚未指定其类型.
  • 您在调用rgx.Replace时使用了"input"参数,但您还没有在任何地方声明它.

我猜您正在尝试致电 此版本的Regex.Replace .那将是(在您的代码中)

I'm guessing you are trying to call this version of Regex.Replace. That would be (in your code)

string result = rgx.Replace(rgs, pattern, replacement);

如果这只是您代码的一部分,请共享所有代码,以便我们确定您在做什么.如果不是,请分享您的尝试...

If this is only part of your code, please share all of it so we can make sure what you're doing. If it is not, please share what you're trying to do...

希望这会有所帮助.


这篇关于C#学习者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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