Coder Social home page Coder Social logo

Comments (8)

guylando avatar guylando commented on July 26, 2024

"".Split((new List<char>() { ',' }).ToArray(), StringSplitOptions.RemoveEmptyEntries)
throws Object reference not set to an instance of an object.
happens because
this.GetTypeByFriendlyName(completeName, true)
returns null where it passes completeName = List

from expressionevaluator.

guylando avatar guylando commented on July 26, 2024

"".Split(Array(',').Select(item => (char)item).ToArray(), StringSplitOptions.RemoveEmptyEntries)
fails too, the object[] array GetMethod does not find the linq extension method "Select"

from expressionevaluator.

guylando avatar guylando commented on July 26, 2024

"".Split(List(',').Select(item => (char)item).ToArray(), StringSplitOptions.RemoveEmptyEntries)
fails too, doesnt find the correct "Split" overload because the conversation to char array fails

from expressionevaluator.

guylando avatar guylando commented on July 26, 2024

@codingseb any help please? All I wanted is to just split a string...
I cant even create a char array using the library

from expressionevaluator.

guylando avatar guylando commented on July 26, 2024

"".Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries) worked as a workaround

from expressionevaluator.

codingseb avatar codingseb commented on July 26, 2024

Hi I am at work for now and I develop ExpressionEvaluator in my spare time.
I will look to add support for typed arrays when I have some time.

Thanks for sharing your workaround

from expressionevaluator.

guylando avatar guylando commented on July 26, 2024

Thanks, great project. Better than the alternatives because of the simplicity of use and because the code fits in one cs file and the easy to understand documentation. Would suggest to concentrate on those areas (extending useful operators like discussed in the bugs above, and giving more examples in the documentation)

from expressionevaluator.

codingseb avatar codingseb commented on July 26, 2024

I just added a new function ArrayofType to manage at least string split (some example are added in the readme.

A better support of types, generics, array and collections creation are on my todo list.

For now I consider this issue closed.

from expressionevaluator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.