Course Content

Course Content


In C Sharp, reflection is used to access a property of an object and use it in your code without having to declare or instantiate the object. The following example shows how you can use reflection to find out whether a string contains only lowercase letters.

Reflections help writers:

  • Understand their strengths and weaknesses in their writing style,
  • Improve their skills by identifying areas that need work, and
  • Identify the types of content that work best for them.

The reflection API can be used with any class in C Sharp. Reflections can be applied either on the class itself or on an object of that class. The reflection API is available in .NET Core 2.0 and later versions of C Sharp.

Writing reflections is hard, but not impossible. There are some steps you can take to make this process easier.

Reflections in C Sharp:

  • Make sure you have a good understanding of the code you are writing
  • Make sure your code is clean and well structured
  • Focus on writing the code that solves the problem at hand, rather than what it does
  • Write your reflections as comments above each line of code

Reflections are a type of metadata that can be attached to any class or method in C# and allows a developer to see what happens when they run their code. This metadata can be used by other developers, in unit tests, or when debugging.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere