# NativeActivityContext.GetValue Method

## Definition

 GetValue(Variable) Returns the value of the specified variable in the current NativeActivity instance. GetValue(Variable) Returns the value of the specified generic variable in the current NativeActivity instance.

## GetValue(Variable)

Returns the value of the specified variable in the current NativeActivity instance.

``````public:
System::Object ^ GetValue(System::Activities::Variable ^ variable);``````
``public object GetValue (System.Activities.Variable variable);``
``override this.GetValue : System.Activities.Variable -> obj``
``Public Function GetValue (variable As Variable) As Object``

#### Parameters

variable
Variable

The variable whose value is being retrieved during execution of the current NativeActivity instance.

#### Returns

Object

The value of the specified variable.

## GetValue<T>(Variable<T>)

Returns the value of the specified generic variable in the current NativeActivity instance.

``````public:
generic <typename T>
T GetValue(System::Activities::Variable<T> ^ variable);``````
``public T GetValue<T> (System.Activities.Variable<T> variable);``
``override this.GetValue : System.Activities.Variable<'T> -> 'T``
``Public Function GetValue(Of T) (variable As Variable(Of T)) As T``

#### Type Parameters

T

The type of the variable whose value is being retrieved.

#### Parameters

variable
Variable<T>

The generic variable whose value is being retrieved during execution of the current NativeActivity instance.

#### Returns

T

The value of the specified variable.
{"ft_lang_label":"__label__en","ft_lang_prob":0.512019,"math_prob":0.79484415,"size":1486,"snap":"2020-34-2020-40","text_gpt3_token_len":293,"char_repetition_ratio":0.21929824,"word_repetition_ratio":0.35,"special_character_ratio":0.19179004,"punctuation_ratio":0.15899582,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9820078,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-25T04:38:36Z\",\"WARC-Record-ID\":\"<urn:uuid:6a3004ca-0e2b-4341-bc6d-66c80da2965e>\",\"Content-Length\":\"43698\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:941b81cc-46e9-47f1-88d0-826b882118e6>\",\"WARC-Concurrent-To\":\"<urn:uuid:837f8105-b860-4b91-977d-213f8a05284a>\",\"WARC-IP-Address\":\"104.117.19.109\",\"WARC-Target-URI\":\"https://docs.microsoft.com/en-us/dotnet/api/system.activities.nativeactivitycontext.getvalue?view=netframework-4.8\",\"WARC-Payload-Digest\":\"sha1:4KOY5JFLY26BDJEE2NO7QJN2KG3KKIZL\",\"WARC-Block-Digest\":\"sha1:2LXA2OW7W5OYJDECW3LO3ZZ3IBINR74G\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600400221980.49_warc_CC-MAIN-20200925021647-20200925051647-00287.warc.gz\"}"}