Quantcast
Channel: R.NET
Viewing all articles
Browse latest Browse all 1634

Commented Unassigned: Access violation with AsList [81]

$
0
0
With this code:

```
var numlist = engine.Evaluate("c(1.5, 2.5)").AsList();
Console.WriteLine(numlist);
Console.WriteLine(numlist[1]);
```

I get an access violation when attempting to retrieve item 1. (I get NullReferenceException when retrieving item 0).
Comments: By the way, it seems IsList returns true for pairlists, but not for normal lists: ``` var pl = engine.Evaluate("pairlist(a=5)"); var l = engine.Evaluate("list(a=5)"); Console.WriteLine(pl.IsList()); Console.WriteLine(l.IsList()); ``` The above produces "True\nFalse". If this is the intended behavior, the documentation should be clarified.

Viewing all articles
Browse latest Browse all 1634

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>