//完成类似于vb的left函数的功能(返回字符串ssource的左ilength位的字符串)。
console.writeline("please enter a string to treaded:");
string s = console.readline();
int i = 0;
bool binputvalid = false;
while(!binputvalid){
try{
console.writeline("please enter the length from left most:");
i = convert.toint32(console.readline());
if(i > s.length) throw new exception("");