@Shervan360, Welcome to Microsoft Q&A, as the Microsoft Learning C# language versioning said, .NET version has some correspond relationship with the c# version.
If you want to use lower 7.0 c# version, you could downgrade your Target Framework from .NET 7 to .NET Core 2.x
or .NET Framework
.
Hope my solution could help you.
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.