How to Select from Strong Array

When you have a String array and you want to select elements till the end and make a returning array or list with those elements, you need to follow the function given below:

You can suppose an array like given here but you want a new array which starts from third element and takes everything:

arrstr = {“1”,“2”,“3”,“4”,“5”,“6”}

arrstr is a array of string variable

arroutput = arrstr.Skip(2)

arroutput is a system.collections.generic.Ienumerable variable

The above process will leave the first two elements from the array and choose all the rest elements.

<Activity mc:Ignorable="sap sap2010 sads" x:Class="Main" mva:VisualBasic.Settings="{x:Null}" sap2010:WorkflowViewState.IdRef="Main_1"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
 xmlns:s="clr-namespace:System;assembly=mscorlib"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
 xmlns:ui="http://schemas.uipath.com/workflow/activities"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <TextExpression.NamespacesForImplementation>
    <sco:Collection x:TypeArguments="x:String">
      <x:String>System.Activities</x:String>
      <x:String>System.Activities.Statements</x:String>
      <x:String>System.Activities.Expressions</x:String>
      <x:String>System.Activities.Validation</x:String>
      <x:String>System.Activities.XamlIntegration</x:String>
      <x:String>Microsoft.VisualBasic</x:String>
      <x:String>Microsoft.VisualBasic.Activities</x:String>
      <x:String>System</x:String>
      <x:String>System.Collections</x:String>
      <x:String>System.Collections.Generic</x:String>
      <x:String>System.Data</x:String>
      <x:String>System.Diagnostics</x:String>
      <x:String>System.Drawing</x:String>
      <x:String>System.IO</x:String>
      <x:String>System.Linq</x:String>
      <x:String>System.Net.Mail</x:String>
      <x:String>System.Xml</x:String>
      <x:String>System.Xml.Linq</x:String>
      <x:String>UiPath.Core</x:String>
      <x:String>UiPath.Core.Activities</x:String>
      <x:String>System.Windows.Markup</x:String>
      <x:String>System.Collections.ObjectModel</x:String>
    </sco:Collection>
  </TextExpression.NamespacesForImplementation>
  <TextExpression.ReferencesForImplementation>
    <sco:Collection x:TypeArguments="AssemblyReference">
      <AssemblyReference>System.Activities</AssemblyReference>
      <AssemblyReference>Microsoft.VisualBasic</AssemblyReference>
      <AssemblyReference>mscorlib</AssemblyReference>
      <AssemblyReference>System.Data</AssemblyReference>
      <AssemblyReference>System</AssemblyReference>
      <AssemblyReference>System.Drawing</AssemblyReference>
      <AssemblyReference>System.Core</AssemblyReference>
      <AssemblyReference>System.Xml</AssemblyReference>
      <AssemblyReference>System.Xml.Linq</AssemblyReference>
      <AssemblyReference>PresentationFramework</AssemblyReference>
      <AssemblyReference>WindowsBase</AssemblyReference>
      <AssemblyReference>PresentationCore</AssemblyReference>
      <AssemblyReference>System.Xaml</AssemblyReference>
      <AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference>
      <AssemblyReference>UiPath.System.Activities</AssemblyReference>
      <AssemblyReference>System.ServiceModel</AssemblyReference>
      <AssemblyReference>System.ValueTuple</AssemblyReference>
      <AssemblyReference>UiPath.Excel</AssemblyReference>
      <AssemblyReference>UiPath.Mail</AssemblyReference>
      <AssemblyReference>System.Collections.Immutable</AssemblyReference>
      <AssemblyReference>UiPath.Word</AssemblyReference>
    </sco:Collection>
  </TextExpression.ReferencesForImplementation>
  <Sequence sap2010:WorkflowViewState.IdRef="Sequence_1">
    <Sequence.Variables>
      <Variable x:TypeArguments="s:String[]" Default="[{&quot;one&quot;,&quot;two&quot;,&quot;three&quot;,&quot;four&quot;,&quot;Five&quot;}]" Name="arrOriginal" />
      <Variable x:TypeArguments="s:String[]" Name="arrNew" />
      <Variable x:TypeArguments="x:Int32" Default="2" Name="intStartIndex" />
    </Sequence.Variables>
    <Assign sap2010:WorkflowViewState.IdRef="Assign_2">
      <Assign.To>
        <OutArgument x:TypeArguments="s:String[]">[arrNew]</OutArgument>
      </Assign.To>
      <Assign.Value>
        <InArgument x:TypeArguments="s:String[]">[new string(arrOriginal.Length - intStartIndex-1) {}]</InArgument>
      </Assign.Value>
    </Assign>
    <ui:InvokeCode ContinueOnError="{x:Null}" Code="Array.Copy(arrOriginal,intStartIndex,arrNew, 0,arrOriginal.Length - intStartIndex)" DisplayName="Invoke Code" sap2010:WorkflowViewState.IdRef="InvokeCode_1">
      <ui:InvokeCode.Arguments>
        <InOutArgument x:TypeArguments="s:String[]" x:Key="arrOriginal">[arrOriginal]</InOutArgument>
        <InOutArgument x:TypeArguments="s:String[]" x:Key="arrNew">[arrNew]</InOutArgument>
        <InArgument x:TypeArguments="x:Int32" x:Key="intStartIndex">[intStartIndex]</InArgument>
      </ui:InvokeCode.Arguments>
    </ui:InvokeCode>
    <ui:ForEach x:TypeArguments="x:Object" CurrentIndex="{x:Null}" DisplayName="For Each" sap2010:WorkflowViewState.IdRef="ForEach`1_2" Values="[arrNew]">
      <ui:ForEach.Body>
        <ActivityAction x:TypeArguments="x:Object">
          <ActivityAction.Argument>
            <DelegateInArgument x:TypeArguments="x:Object" Name="item" />
          </ActivityAction.Argument>
          <Sequence DisplayName="Body" sap2010:WorkflowViewState.IdRef="Sequence_3">
            <ui:MessageBox Caption="{x:Null}" ChosenButton="{x:Null}" Buttons="Ok" DisplayName="Message Box" sap2010:WorkflowViewState.IdRef="MessageBox_3" Text="[item.ToString]" TopMost="True" />
          </Sequence>
        </ActivityAction>
      </ui:ForEach.Body>
    </ui:ForEach>
    <sads:DebugSymbol.Symbol>dz5DOlxVc2Vyc1xhdm5pc2guZ3VwdGFcRGVza3RvcFxVaVBhdGggVHJhaW5pbmcgTVxUZXN0XE1haW4ueGFtbA9AA2IOAgEBQjZCjwECAQNEM0Q2AgECRgVNDgIBEk4FVBUCAQtVBWASAgEESzJLZwIBFUgzSDsCARNRRFFMAgEQUElQVgIBDlJFUlQCAQxVkAFVmgECAQlbC10WAgEFXA1cxQECAQZcogFcswECAQc=</sads:DebugSymbol.Symbol>
  </Sequence>
  <sap2010:WorkflowViewState.ViewStateManager>
    <sap2010:ViewStateManager>
      <sap2010:ViewStateData Id="Assign_2" sap:VirtualizedContainerService.HintSize="352.666666666667,62" />
      <sap2010:ViewStateData Id="InvokeCode_1" sap:VirtualizedContainerService.HintSize="352.666666666667,164" />
      <sap2010:ViewStateData Id="MessageBox_3" sap:VirtualizedContainerService.HintSize="314,58.6666666666667" />
      <sap2010:ViewStateData Id="Sequence_3" sap:VirtualizedContainerService.HintSize="336,182.666666666667">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="ForEach`1_2" sap:VirtualizedContainerService.HintSize="352.666666666667,321.333333333333" />
      <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="374.666666666667,751.333333333333">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Main_1" sap:VirtualizedContainerService.HintSize="414.666666666667,831.333333333333" />
    </sap2010:ViewStateManager>
  </sap2010:WorkflowViewState.ViewStateManager>
</Activity>