Can you check out the sample C#.net code mentioned here:
https://github.com/Azure-Samples/storage-dotnet-manage-storage-account-network-rules
ManageStorageAccountNetworkRules.csproj has got program.cs main class file which has got the code to update/create the Firewall rules for the storage account !
Checkout the program.cs which uses fluent APIs of Azure SDK
Regards,
Shiva.