Hello @Steve Clarke
Thanks for posting!
The CS1061 error is caused when you try to call a method or access a class member that does not exist. Refer this Compiler messages documentation.
The following example generates CS1061 because Person
does not have a DisplayName
method. It does have a method that is called WriteName
. Perhaps that is what the author of this source code meant to write.
public class Person
{
private string _name;
public Person(string name) => _name = name;
// Person has one method, called WriteName.
public void WriteName()
{
System.Console.WriteLine(_name);
}
}
public class Program
{
public static void Main()
{
var p = new Person("PersonName");
// The following call fails because Person does not have
// a method called DisplayName.
p.DisplayName(); // CS1061
}
}
To correct this error:
- Make sure you typed the member name correctly.
- If you have access to modify this class, you can add the missing member and implement it.
- If you don't have access to modify this class, you can add an extension method.
Note: Not all relationships and resources support the $expand
query parameter. For example, you can expand the directReports, manager, and memberOf relationships on a user, but you cannot expand its events, messages, or photo relationships. Not all resources or relationships support using $select
on expanded items.
Refer this to know about known issues- limitations apply to query parameters.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.