-
Every extended type has it's own project
i.e:
-
string
->Elfo.ExtensionMethods.String
-
Boolean
->Elfo.ExtensionMethods.Boolean
-
-
If the project related to your type doesn't exist, then create it (type is .NET Standard Library)
and replace the content of the
.csproj
with this:<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net40;net452;net471;netstandard2.0</TargetFrameworks> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> <PropertyGroup Condition=" '$(TargetFramework)' == 'net40' "> <DefineConstants>NET40</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(TargetFramework)' == 'net452' "> <DefineConstants>NET452</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(TargetFramework)' == 'net471' "> <DefineConstants>NET471</DefineConstants> </PropertyGroup> <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> <DefineConstants>NETSTD20</DefineConstants> </PropertyGroup> </Project>
-
Add a new
partial static
class with this naming convention:*Extended type*ExtensionMethods
i.e:
String
->StringExtensionMethods
-
Add a new folder at the same level and with the same name of the class created above
-
Inside the folder, create one
.cs
file for each extension method you want to add.Name it like the method you want to create, inside the
.cs
file extend the partial class created in the step above.Inside the class add as many overloads as you want.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Collection of extremely useful extension methods you're gonna love for sure!
License
ElfoCompany/Elfo.ExtensionMethods
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Collection of extremely useful extension methods you're gonna love for sure!
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published