hog Posted June 24, 2003 Posted June 24, 2003 Is there a simply way to have VS calcualte how any lines of code are contained in a project? Quote My website
Mehyar Posted June 24, 2003 Posted June 24, 2003 I dont think so, i have tried to find this but with no luck... I cant think of any way other than adding the number of lines for each class or module in your project . Quote Dream as if you'll live forever, live as if you'll die today
Leaders dynamic_sysop Posted June 24, 2003 Leaders Posted June 24, 2003 here ya go , you would have to account for how many forms you have , but you should get the idea : Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim str(2) As String, x As Integer Dim strLocation As String = Application.StartupPath strLocation = Replace(strLocation, "bin", "") str(1) = strLocation & "Form1.vb" : str(2) = strLocation & "Form2.vb" Dim sr(2) As StreamReader For x = 1 To 2 sr(x) = New StreamReader(New FileStream(str(x), FileMode.Open)) TextBox1.Text = sr(x).ReadToEnd() MessageBox.Show("The Number of Lines in " & str(x) & " is:" & Chr(10) & TextBox1.Lines.Length) sr(x).Close() Next End Sub Quote
hog Posted June 24, 2003 Author Posted June 24, 2003 Nice one I'll give it a whirl:) So when r the twins due? Quote My website
Leaders dynamic_sysop Posted June 24, 2003 Leaders Posted June 24, 2003 the twins are due in august , but my wife has been in hospital already so they may come sooner :-\ Quote
Grimfort Posted June 25, 2003 Posted June 25, 2003 I just do a search in all files, for * it brings back everything and a final value. It includes resource files and form setups etc etc, but its quick and simple. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.