Here is my solution:
using System;
class Program
{
static void Main()
{
long n = long.Parse(Console.ReadLine());
long check100 = n / 100;//Dividing the number by 100 >> and the 3rd number is the FIRST NOW
long checkRest = check100 % 10;//using module division and getting the leftover number
bool result = (checkRest == 7);//checking whether the leftover number is 7 or not with bool expression
Console.WriteLine("Third number 7? {0}", result);//printing the result
}
}