Show / Hide Table of Contents

Storage.Put Method (StorageContext, string, string)

Inserts a given value to the given key in the persistent store.

Namespace: Neo.SmartContract.Framework.Services.Neo

Assembly: Neo.SmartContract.Framework

Syntax

public extern void Put(Neo.SmartContract.Framework.Services.Neo.StorageContext context, string key, string value)

Parameters:

Context: Storage context as a StorageContext .

Key: Key as a string.

Value: Value as a string.

Return value: void.

Example

public class Contract1: FunctionCode
{
     public static void Main()
     {
         String key = "key";
         String value = "value";
         Storage.Put(Storage.CurrentContext, key, value);
     }
}

Back