1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

csharp > string > 4番目から最後までを取得 > .Substring(3)

1
Last updated at Posted at 2015-11-19

参考
http://dobon.net/vb/dotnet/string/substring.html

test.cs
string text2 = "123456789";
string res = text2.Substring(3);
Console.WriteLine(res);
結果
456789

C++ Builderなどでは SubString(位置, MAXINT)のような記載をしたりしていたが、C#の場合は単純に2つ目のパラメータを省略すればいいようだ。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?