I found a method to find the class if the class existed before.
You can retrieve all changes in TFVC of Azure DevOps by following the steps below:
1, get all of the changes url in your TFVC:
https://dev.azure.com/<OrganizationName>/<ProjectName>/_apis/tfvc/changesets?api-version=6.0
Just a sample, if you are using Python:
import http.client
conn = http.client.HTTPSConnection("dev.azure.com")
payload = ''
headers = {
'Authorization': 'Basic <PAT token>',
}
conn.request("GET", "/<OrganizationName>/<ProjectName>/_apis/tfvc/changesets?api-version=6.0", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Detailed steps about how to get PAT token:
https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows
This will return a json response, there will list all of the changes url.
2, Send request to those changes urls to show the details:

3, Send request to the changes content urls:


4, After that, you will get the content of the changes, You can store them in your favorite data structure for later retrieval.
Above steps are all GET method. These code are similar so I just share one code sample.
5, Write code to find the specific Class name in each change content:
Examples for string find in Python
After that, you will be able to find it. Above steps is based on Python, you can use other languages.
Documents refer:
https://learn.microsoft.com/en-us/rest/api/azure/devops/tfvc/changesets?view=azure-devops-rest-6.0