Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6121255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:45:48+00:00 2026-05-23T15:45:48+00:00

I am loading a file that contains a CSV and I’m using LINQ to

  • 0

I am loading a file that contains a CSV and I’m using LINQ to determine if there any failures and I have fallen at the first hurdle:

var lines = File.ReadAllLines(@"C:\Projects\Misc Files\FontToImageGenerator\test\testMODIFIED.txt");
foreach (string line in lines)
{
    var splitup = line.Split(',');
    //Check first 3 are from A-q or 65-113 in ASCII
    var first3ok = splitup.Take(3).All(x => Char.GetNumericValue((char)x[0]) >= 65 && <= 113); //****This doesn't compile**** IEnumberable<string> does not contain a defintition for All and the best overload arguments contains invalid arguemnts

    //Check next 20 chars and they alternate matching A-q and 1-9


    //Check the next char is from A-I


   //Last 8 chars in the line should contain 2 chars uppercase from A-Z
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:45:49+00:00Added an answer on May 23, 2026 at 3:45 pm

    The current error really doesn’t have anything to do with LINQ. You’ll see the same thing if you do:

    string x = ...;
    
    if (Char.GetNumericValue((char)x[0]) >= 65 && <= 113)
    

    That’s just not valid C# – you haven’t got a valid operand for the <= part. You’d need something like:

    if (Char.GetNumericValue((char)x[0]) >= 65 && 
        Char.GetNumericValue((char)x[0]) <= 113)
    

    I don’t think that’s really what you mean though – I think you’ve misunderstood what GetNumericValue does. I suspect you really want:

    x[0] >= 'A' && x[0] <= 'q'
    

    So:

    var first3ok = splitup.Take(3).All(x => x[0] >= 'A' && x[0] <= 'q');
    

    Note that this isn’t checking the first three characters – it’s checking the first character of each of the first three bits of the comma-separated string. It’s unclear whether that’s what you meant or not.

    However, it looks to me like this is one situation where you’d be better off using a regex…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a peculiar problem. I am loading a JSON file that contains the
I have a CSV file that contains over 80,000 rows and 100 columns. I'm
We have a Flex app that is currently loading an XML file that contains
I have an HTML file that I am loading into a JTextPane which contains
I have a WIX XML document that contains 2,000+ file tags. I am trying
I have a welcome page (JSP file) for my application that contains some dynamic
I have a PHP file that contains a form and which submits back to
I have a file that contains about 200,000 long values that I want to
I'm loading data into a DataSet from an XML file using the ReadXml method.
I have been writing a small java application (my first!), that does only a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.