16 lines
287 B
C#
16 lines
287 B
C#
namespace Lecture.Exercises;
|
|
|
|
public class Conversion
|
|
{
|
|
public static int StringToInt(string number)
|
|
{
|
|
int res = 0;
|
|
|
|
for (int i = 0; i < 6; i++)
|
|
{
|
|
res = res * 10 + int.Parse(number[i].ToString());
|
|
}
|
|
|
|
return res;
|
|
}
|
|
} |