在c#中剪切一个特殊字符

Cut a special char in c#

有人知道如何使用 SPLIT 方法切割字符串吗?

No idea when it comes with ' \ '.

**identitiname = HttpContext.Current.User.Identity.Name;
identitiname  *// it has the value  FAMILY\ANDRES*
string[] usuario = identitiname.Split( '\' );**

它给了我一个错误代码。

此致

当我们用 \ 拆分字符串时,您必须使用 \\ 因为 \ 用于格式化..

   string[] usuario = identitiname.Split( '\' );