VOOZH about

URL: https://www.nuget.org/packages/HKW.FastMember/

⇱ NuGet Gallery | HKW.FastMember 1.2.6




HKW.FastMember 1.2.6

dotnet add package HKW.FastMember --version 1.2.6
 
 
NuGet\Install-Package HKW.FastMember -Version 1.2.6
 
 
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="HKW.FastMember" Version="1.2.6" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HKW.FastMember" Version="1.2.6" />
 
Directory.Packages.props
<PackageReference Include="HKW.FastMember" />
 
Project file
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 HKW.FastMember --version 1.2.6
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: HKW.FastMember, 1.2.6"
 
 
#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 HKW.FastMember@1.2.6
 
 
#: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=HKW.FastMember&version=1.2.6
 
Install as a Cake Addin
#tool nuget:?package=HKW.FastMember&version=1.2.6
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Original project: fast-member

Fast access to .net fields/properties

In .NET reflection is slow... well, kinda slow. If you need access to the members of an arbitrary type, with the type and member-names known only at runtime - then it is frankly hard (especially for DLR types). This library makes such access easy and fast.

An introduction to the reasons behind fast-member can be found <a href="http://marcgravell.blogspot.com/2012/01/playing-with-your-member.html" target="_blank">on my blog</a>; example usage is simply:

var accessor = TypeAccessor.Create(type); 
string propName = // something known only at runtime 
while( /* some loop of data */ )
{ 
 accessor[obj, propName] = rowValue; 
}

or

// obj could be static or DLR 
var wrapped = ObjectAccessor.Create(obj);
string propName = // something known only at runtime 
Console.WriteLine(wrapped[propName]);

Ever needed an IDataReader?

This is pretty common if you are doing object-mapping between an object model and ADO.NET concepts such as DataTable or SqlBulkCopy; loading a DataTable (yes, some people still use it) from a sequence of typed objects can now be as easy as:

IEnumerable<SomeType> data = ... 
var table = new DataTable(); 
using(var reader = ObjectReader.Create(data)) 
{ 
 table.Load(reader); 
}

(the Create method offers parameters to control the specific members, if needed)

Or if you want to throw the data into a database as fast as humanly possible:

using(var bcp = new SqlBulkCopy(connection)) 
using(var reader = ObjectReader.Create(data, "Id", "Name", "Description")) 
{ 
 bcp.DestinationTableName = "SomeTable"; 
 bcp.WriteToServer(reader); 
}

Ahead of Time

Library emits IL code during runtime. Will not work in constrained Ahead of Time environments. Xamarin iOS and Unity IL2CPP are such.

Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on HKW.FastMember:

Package Downloads
HKW.TOML

HKW.TOML is TOML reader, writer, deserializer, serializer and generate classes for C#.

HKW.ViewModels

Package Description

HKW.StringFormat

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.6 3,610 7/23/2025
1.2.5 3,548 7/21/2025
1.2.4 3,247 7/18/2025
1.2.3 3,159 7/18/2025
1.2.2 3,221 7/17/2025
1.2.1 3,256 7/9/2025
1.2.0 3,217 7/8/2025
1.0.0 3,517 12/16/2023

core-clr support (rtm)