What is an interface? [duplicate]

1

Background ( TL; DR ):
I'm working on an ASP.NET legacy project, I was testing some of it's functionality when I got an error in the browser console:
Failed to load resource: the server responded with a status of 500 (Internal Server Error) I quickly debugged the code to find out what led to the error when I came across a method that received 2 parameters, but when I accessed it pressing F12 in Visual Studio, it took me to a page with several definitions of lists with the name of the object.

When I asked my supervisor, he gave me a vague definition, saying that that "method" was actually an interface, when searching I noticed that in many articles there is the phrase:

  

Interface is the name given to how "communication" occurs between two distinct parts that can not connect directly.

In case the interface in question was a query , but I do not see benefits of adopting this type of implementation, since it makes it difficult to read the program and consequently makes it more difficult to solve the code problems.

Question:

  • What is the interface concept in programming?
  • What are the benefits of using an interface in the implementation?
  • How do I view the contents of an interface?
asked by anonymous 27.06.2017 / 20:51

0 answers