Working with .NET strings and arrays in C/AL
The .NET datatype in C/AL enables developers to use .NET strings and dynamics arrays in client application code. While the Syste.String
datatype is compatible with NAV Text type, .NETÂ arrays cannot be directly converted to NAV arrays.
In the following example, we will see how to efficiently use these datatypes in your code.
How to do it...
Objects developed in the walk-through get stock exchange data from the Yahoo Finance website and present the result in a table. Stock indicators are published in CSVÂ format - a list of comma-separated strings, each containing a dataset related to a separate index.
First of all, let's create a table where the data received from the stock information provider will be stored. Open
Table Designer
in C/SIDE and create a table.Create the table fields as shown in the following table:
Field No.
Field Name
Data Type
Length
1
Symbol
Code
10
2
Trade Date
Date
3
Name
Text
100
4
Change
Text
30
5
...