I want to Generate Code from SQL server to C# application !
like if i type code 5 in my sql table than start numbers in C# application with 00001
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Joginder BangerRank #360 · 7K reputationPosted Dec 17, 2014, 2:23 AM EST
int sqlnumber=3;
//create a function...
public int retunrNumber(int number)
{
string tempnumber="";
for(int i=1;i<=number;i++)
{
if(i!=number)
{
tempnumber+="0";
}
else
{
tempnumber+="1";
}
}
return convert.Int32(tempnumber);
}