Console.WriteLine(substring("hello world", 2));
static bool check(string s) {
return (s == null || s == String.Empty) ? true : false;
static string substring(string value, int startIndex) {
throw new CustomException("value must not be null or empty");
for (int i = startIndex; i < value.Length; i++) {
public class CustomException : Exception {
public CustomException(string message) : base (message) {