Get Filenames in a Folder

There might be a requirement to list all the filenames inside a folder. The steps below would be useful: 1. Hold the “Shift” key, right-click the folder containing a list of files and select “Open Command Window Here.” 2. Type dir > files.txt in the Command Prompt window. Press “Enter.” 3. A text file name […]

Count records using LINQ

I need to get the number of Tasks in a project for the MaxValue property of Telerik ProgressBar and the numbers of completed tasks for its Value property. Below are the codes I used: Public Sub progressBar() Dim projectID As String = Me.txtID.Text Dim db As New ProjectsEntities() Dim totalTasks = Aggregate task In db.tblTasks […]