This might be off-topic, but is there a utitily to count lines in all c#
files in a folder? 6 7961
you can download the following project from c-sharpcorner http://www.c-sharpcorner.com/1/CountLinesLC.asp
"Stan" <no****@yahoo.com> wrote in message
news:uo**************@tk2msftngp13.phx.gbl... This might be off-topic, but is there a utitily to count lines in all c# files in a folder?
"Stan" <no****@yahoo.com> wrote in news:uoZ37hGUDHA.3796
@tk2msftngp13.phx.gbl: This might be off-topic, but is there a utitily to count lines in all c# files in a folder?
Well, I have Cygwin installed, so I do "wc -l *.cs", it's pretty easy.
I'm sure there's a version of wc ("Word Count") available for win32
somewhere.
Mark
In Visual Studio, click the "Find" button, then check the "Use" box, select
Regular Expressions, then search for "$" of "^". You can select Entire
Project, Current Solution, or Current Document depending on what you want
the line count for.
--
Thomas Schrantz
Sr. Software Engineer
Acquist Incorporated
Thomas, how would one get the line count? Searching for $ or ^ just finds
the end or beginning of a line. That's a cool trick if there is a way to
get the count.
--
Greg Ewing [MVP] http://www.claritycon.com/
"Thomas Schrantz" <tom@--dont.think.about.spamming.me--acquist.com> wrote in
message news:#T**************@TK2MSFTNGP11.phx.gbl... In Visual Studio, click the "Find" button, then check the "Use" box,
select Regular Expressions, then search for "$" of "^". You can select Entire Project, Current Solution, or Current Document depending on what you want the line count for.
-- Thomas Schrantz Sr. Software Engineer Acquist Incorporated
On Tue, 22 Jul 2003 13:25:13 -0500, "Greg Ewing [MVP]"
<gewing@_NO_SPAM_claritycon.com> wrote: Thomas, how would one get the line count? Searching for $ or ^ just finds the end or beginning of a line. That's a cool trick if there is a way to get the count.
The count shows up in the Find Results window. Unfortunately, it
counts blank lines too. :(
Austin Ehlers
Austin Ehlers <th***********************@hotmail.com> wrote: On Tue, 22 Jul 2003 13:25:13 -0500, "Greg Ewing [MVP]" <gewing@_NO_SPAM_claritycon.com> wrote:
Thomas, how would one get the line count? Searching for $ or ^ just finds the end or beginning of a line. That's a cool trick if there is a way to get the count.
The count shows up in the Find Results window. Unfortunately, it counts blank lines too. :(
Ah, but that's easy to fix with an appropriate regular expression.
^\s*\S+
for instance.
--
Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ling Lee |
last post by:
Hi all.
I'm trying to write a program that:
1) Ask me what file I want to count number of lines in, and then counts the
lines and writes the answear out.
2) I made the first part like this:
...
|
by: phil |
last post by:
Using Tkinter Canvas to teach High School Geometry
with A LOT of success.
My drawing gets very slow after a lot of actions.
For instance I have created code to rotate a set of objects
about a...
|
by: laredotornado |
last post by:
Hello, I am trying to decipher an XSL sheet that is not my own, and
yes, I'm a newbie.
<xsl:template match="sentence">
<xsl:variable name="lines" select="count(line) +
count(preceding::line)"/>...
|
by: JD |
last post by:
Hi guys
I'm trying to write a program that counts the occurrences of HTML tags
in a text file. This is what I have so far:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
...
|
by: mesterak |
last post by:
I want to very quickly count the number of lines in text files without having
to read each line and increment a counter. I am working in VB.NET and C#.
Does anyone have a very fast example on how...
| |
by: Martin Joergensen |
last post by:
Hi,
I have some files which has the following content:
0 0 0 0 0 0
0 1 1 1 1 0
0 1 1 1 1 0
0 1 1 1 1 0
0 1 1 1 1 0
0 0 0 0 0 0
|
by: shivam001 |
last post by:
I have the following file as the input
APPLE 0 118 1 110 1 125 1 135 2 110 3 107 3 115 3 126
ORANGE 0 112 1 119 2 109 2 119 3 112 4 109 4 128
MANGO 0 136 1 143 2 143 3 143 4 136
BANANA 0 5 1...
|
by: waynejr25 |
last post by:
can anyone help me add a function that will count the occurance of each word in an input file. here's the code i have so far it counts the number of characters, words, and lines but i need the...
|
by: lovecreatesbea... |
last post by:
It takes mu so time to finish this C source code line count function.
What do you think about it?
/
*******************************************************************************
* Function ...
|
by: NvrBst |
last post by:
Whats the best way to count the lines? I'm using the following code
at the moment:
public long GetNumberOfLines(string fileName) {
int buffSize = 65536;
int streamSize = 65536;
long...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |