.NET Feature Flags

Split's .NET SDK provides robust, scalable feature flag management in .NET. .NET Core and C#, giving any team the power to safely launch features and target them to users.

Begin your free trial today.

Why use Split for .NET?

Split’s .NET SDK brings free, scalable feature flagging to any app, website or experience built in the .NET framework. Split helps teams control rollouts, and customer experiences, while gathering new data and insight on how their products are being engaged. With Split, teams can:

  • Release features to production but disabled for all users by default
  • Target new features only to internal QA teams
  • Slowly roll out features to a broader audience by percentage, demographic, geography, account type, or any other metric
  • Kill features with a single click to revert back to your safe state

Split works across many different languages, letting developers, PMs and support teams control feature rollout from one unified view—and monitor the success of any new code. Our integrations bring rollout updates into the tools your team is already using, further opening the feature-delivery process up to your entire organization.

C#

It provides you controlled rollout and feature toggles for C#, too.

Split gives developers working in C# unencumbered access to all the features of Split for .NET—they even use the same SDK.

Getting Started with Split for .NET

Split's .NET SDK is very simple to integrate into your code base and is completely open source. All it really takes to get rolling with Split is initiating the SDK, then splitting your code.

Initiating the SDK

You can use NuGet to import the SDK into your project:

          Install-Package Splitio -Version 3.1.1
        

Then instantiate the SDK and create a new Split client:


using Splitio.Services.Client.Classes;

var config = new ConfigurationOptions();
config.Ready = 10000;

var factory = new SplitFactory("API_KEY", config);
var sdk = factory.Client();

        

We recommend instantiating the Factory once as a singleton and reusing it throughout your application.

Include the API key for the environment you are setting up the SDK for. The API key is available under your Organization Settings page, under the APIs tab. The API key is of type sdk**

Splitting your code.

With the SDK instantiated, it’s now time to start splitting your code base. Find a feature you’d like to split, and wrap it in the split feature flag like so:


var treatment = sdk.GetTreatment("CUSTOMER_ID","SPLIT_NAME");

if (treatment == "on") {
    // insert code here to show on treatment
} else if (treatment == "off") {
    // insert code here to show off treatment
} else {
    // insert your control treatment code here
}
        

The Split .NET SDK integrates seamlessly into your code; no other changes or dependencies are needed to get Split up and running.

For more advanced configurations like running multiple evaluations at once, or using attributes in the SDK, take a look at our .NET SDK documentation.

To continue diving into Split, sign up for a free account today, or dig into our .NET SDK documentation.