Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public string method_5(string string_3)
- {
- string result;
- if (string.IsNullOrEmpty(string_3) && this.list_1.Count > 0)
- {
- result = this.list_1[0];
- }
- else
- {
- string text = string.Empty;
- foreach (string text2 in this.list_1)
- {
- if (string_3.IndexOf(text2) == 0)
- {
- if (string.IsNullOrEmpty(text))
- {
- text = text2;
- }
- else if (text2.Length < text.Length)
- {
- text = text2;
- }
- }
- }
- result = text;
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement