Skip to content

Instantly share code, notes, and snippets.

View xpl0t's full-sized avatar
🏠
Working from home

Johannes Weih xpl0t

🏠
Working from home
  • Germany
View GitHub Profile
@xpl0t
xpl0t / ObjectExtensions.cs
Last active May 29, 2024 16:26
Extension method capable of executing private/public methods on an object
using System;
using System.Reflection;
namespace MyProject.Unit.Tests.Extensions
{
public static class ObjectExtensions
{
/// <summary>
/// Invokes a private/public method on an object. Useful for unit testing.
/// </summary>