Search code examples
c#textboxreturn-valuegeographycoordinate

c# Multiple values from a single textbox


In C# I want to get multiple values from a single textbox. I want to develop an application that convert geographical coordinates frome latitude and longitude in other projection system. For example: The user enter following coordinat 41°24'12.2"N. The software will split and will assign to a = 41; b=24; c= 12.2; I mention that the b can be from 01 to 59 and can be writing in two forms choice by user, like: 41°05'12.2"N. or 41°5'12.2"N.

Thank you


Solution

  • Please read more about string.substring and string.indexof method. For more generic look for extension method in C#.

    Here you have it: https://dotnetfiddle.net/J66V5a