Main Site Documentation

List of supported Language features?


#1

This must have been asked before but whatever terms i used couldnt come up with a thread…

Is there a listing of the supported language features or their replacements?
For example using c#, Ive just now figured out nothing in System.Collections is supported in TinyCLR… it be nice to have a listing of what is or isnt…

I didnt notice any mention on this page anyway:
https://docs.ghielectronics.com/software/tinyclr/intro.html


#2

We don’t have a list at the moment, but it is on our backlog. If you find something missing you can always post here and we can suggest a work around. In the case here, System.Collections is supported, but System.Collections.Generic is not. What specific type are you trying to use in collections?


#3

I have use HastTable, Queue, and ArrayList from collections


#4

Yes i stand corrected… i was pulling out a generic at the same time and was confused.

But specifically using c# 7.3, I’m attempting to use ValueTuple, and even though I’ve imported System.ValueTyple nuget, it seems to have a dependency on something in System.Collections that doesn’t match.

Here is the error reported:

The assembly 'System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' cannot be found.
The assembly 'System.Resources.ResourceManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' cannot be found.
The assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' cannot be found.				

To produce this I target my library project to use c#7.3 and install the System.ValueTuple nuget.
Its worth noting i also installed the System.Collections nuget as well…
Then simple attempt to use:

private static ValueTuple<byte, byte> _valueTuple = (0x0, 0x0);

And while the code compiles, it does not deploy… I hope I’m getting my terms correct here.

Please advise.


#5

And also while on the topic of language features, I was not able to declare a nullable type.
Are they not supported or am i doing something fundamentally wrong here?

private static bool? HwAddressable;

The error here is:

|Error|CS0518|Predefined type 'System.Nullable`1' is not defined or imported|

Please advise


#6

ValueTuple and nullable types both rely on generics, which we do not support, so neither work in TinyCLR at this time.


#7

I get it, so certainly anything that uses ageneric < T > parameter will not work…
Thanks