Note that there are some explanatory texts on larger screens.

plurals
  1. POCompiling error c#
    primarykey
    data
    text
    <p>I have a amount of code that compiles in visual studio, however in a different ide it doesn't compile. </p> <p>the error that is returned is System.IO file does not contain a defintion for "ReadLines".</p> <p>i am using system.io</p> <p>the section of the code that appears with an eror is ReadLines.</p> <p>could anybody offer a soultion? </p> <pre><code>using System; using System.IO; // enable the user of different sections of the .net framework using System.Linq; using System.Collections.Generic; namespace HashTagAssignment { class HashTag { static void Main(string[] args) { string tweets = File.ReadAllText(@"F:\tweets.txt"); // Retrives Text from file and loads into console { Console.WriteLine(tweets); // writes contense to console { var lineCount = File.ReadAllLines(@"F:\tweets.txt").Length; // counts number of lines in the whole document Console.WriteLine("Number of Lines:{0}", lineCount); // displays answer { var result = File.ReadLines(@"F:\tweets.txt").Distinct().Count(); // search txt file for Distinct enteries and implement counter. Console.WriteLine(" Number of Unique Tags: {0}", result); // display result of counter { Console.WriteLine(" Top Twenty By Number:"); // Title Top twenty hash tags, with order they occured in left colum. Console.WriteLine(); // creates a line space var rank = File // assigns varible to a file .ReadLines(@"F:\tweets.txt") // directs to file, in this case text .GroupBy(x =&gt; x) .Select(g =&gt; new { Key = g.Key, Count = g.Count() }) .OrderByDescending(i =&gt; i.Count) .Take(20); foreach (var item in rank) { Console.WriteLine("{0} {1}", item.Count, item.Key); } { { } Console.ReadKey(true); } } } } } } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload