Hi, I have a scenario wherein I need to give access of a system to the hosts of a subnet. For that I need to verify if the incoming request is from the IP which falls within the subnet. Is there some way to do that automatically using c# functionality.

subnet info is not embedded to ip address, it is not in that context.
subnet mask can be anything for a given ip address. subnet masks are used to group ip addresses. what you can know about ip address could only be its type like a,b or c.