Program.cs
void Main()
{
int val = 3;
int? result = null;
int[] arr = new int[] {1,2,3,4,5,6,7};
foreach(int r in arr)
{
if(val==r)
{
result = int.Parse("0"+r);
break;
}
}
result.Dump();
}
output:-
No comments:
Post a Comment