VReflector 2.1.1.2
dotnet add package VReflector --version 2.1.1.2
NuGet\Install-Package VReflector -Version 2.1.1.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VReflector" Version="2.1.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="VReflector" Version="2.1.1.2" />
<PackageReference Include="VReflector" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add VReflector --version 2.1.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: VReflector, 2.1.1.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package VReflector@2.1.1.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=VReflector&version=2.1.1.2
#tool nuget:?package=VReflector&version=2.1.1.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
VReflector
VReflector is Object,Type,Constructor,Method,Member,Event,Field,Property,Parameter,Assembly,StackTrace,Numerics String,DateTime,DateOnly,TimeOnly,TimeSpan and DateTimeOffset helpers utility.
Installation
You can install the VReflector package via NuGet:
dotnet add package VReflector
Or you can use the NuGet Package Manager:
Install-Package VReflector
Basic usage
// Check type is mutable or not.
public class ImmutableUser
{
public readonly int Id;
public string Name { get; init; }
public static readonly int status;
public static string Message { get; }
}
public class MutableUser
{
public readonly int Id;
public string Name { get; init; }
public static string Message { get; private set; }
}
var result1 = typeof(ImmutableUser).GetTypeInfo().IsMutable();
var result2 = typeof(MutableUser).GetTypeInfo().IsMutable();
// Deep check type is mutable or not.
public abstract class A
{
public int Id { get; private set; }
public string? Name { get; init; }
}
public class B : A
{
}
public class C : B
{
public A? MyProperty { get; }
}
public class D : C
{
public B? MyProperty2 { get; }
public IA? MyProperty3 { get; init; }
}
var result1 = typeof(D).GetTypeInfo().IsMutable();
var result2 = typeof(D).IsDeepMutable();
// Get all parents.
public abstract class A
{
public int Id { get; private set; }
public string? Name { get; init; }
}
public class B : A
{
}
public class C : B
{
public A? MyProperty { get; }
}
public class D : C
{
public B? MyProperty2 { get; }
public IA? MyProperty3 { get; init; }
}
var result = typeof(D).GetParentTypes();
Check static class
public static class MyStaticClass
{
}
typeof(MyStaticClass).IsStatic() //true
Check record class
public record MyEmptyRecord
{
}
typeof(MyEmptyRecord).IsRecordClass() //true
Check anonymous class
// Create an anonymous type.
var anonType = new
{
Name = "Bill",
Age = 30
};
var type = anonType.GetType();
var result = type.IsAnonymous(); //true
Get Class,Enum and Struct Access modifier and modifiers
// Create an anonymous type.
protected internal abstract class PublicClass
{
}
var type = typeof(PublicClass);
var result = type.GetAccessModifier(); // protected internal
var info = type.GetTypeModifiers(); // abstract class
Get Method Access modifier and modifiers
// Create an anonymous type.
protected internal abstract class PublicClass
{
}
var type = typeof(PublicClass);
var method = type.GetMethod("ToString");
var result = method.GetMethodAccessModifier(); // public
var info = method.GetMethodModifiers(); // virtual
Lot more...
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.1.2 | 211 | 1/22/2025 |
| 2.1.1.1 | 148 | 1/22/2025 |
| 2.1.1 | 147 | 1/21/2025 |
| 2.1.0 | 169 | 1/20/2025 |
| 2.0.1.1 | 161 | 1/19/2025 |
| 2.0.1 | 147 | 1/19/2025 |
| 2.0.0.1 | 147 | 1/18/2025 |
| 2.0.0 | 160 | 1/18/2025 |
| 1.5.0 | 162 | 1/18/2025 |
| 1.4.0 | 270 | 7/23/2023 |
| 1.3.1 | 299 | 7/21/2023 |
| 1.3.0 | 252 | 7/20/2023 |
| 1.2.3 | 239 | 7/18/2023 |
| 1.2.2 | 205 | 7/18/2023 |
| 1.2.1 | 235 | 7/18/2023 |
| 1.2.0 | 231 | 7/18/2023 |
| 1.1.1 | 229 | 7/15/2023 |
| 1.1.0 | 225 | 7/15/2023 |
| 1.0.1 | 244 | 7/9/2023 |
| 1.0.0 | 247 | 7/8/2023 |