Below is the code. If I pass search value of search parameter e.g: M'test. It throws error.
What is the right way to use this code to support special character like "'"?
var graphClient = await GetGraphClient();
List<QueryOption> queryOptions = new List<QueryOption>();
queryOptions.Add(new QueryOption("$filter", string.Format("startswith(displayName,'{0}')", search)));
var collection = await graphClient.Data.Request(queryOptions).GetAsync();