Extract substring from starting to specified length in C#
Extract string using substring from starting to specified length in C# Programming:
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace MyFirstConsoleApp.Methods
{
public class subStrExtractions
{
public void subStringLength()
{
string input = "abcdefinition";
string result = input.Substring(0,3);
Console.WriteLine($"input is {input}. Extract substring from starting to specified length " + result);
}
}
}
Output:
input is abcdefinition. Extract substring from starting to specified length abc
update more video like this
ReplyDelete