Read file in byte array in vb.net : Public Function Reader(ByVal FilePath_ As String) As Byte() Dim BytArr(FileSystem.FileLen(FilePath_) – 1) As Byte Using fs As New FileStream(FilePath_, FileMode.Open, FileAccess.Read, FileShare.ReadWrite) fs.Read(BytArr, 0, BytArr.Length) fs.Close() End Using Return BytArr End Function Read file in String : Public Function ReaderString(ByVal FilePath_ As String) As String Dim data_str As String Using fs As New FileStream(FilePath_, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite) Using Sr As New StreamReader(fs) data_str = Sr.ReadToEnd Sr.Close() fs.Close() End Using Return data_str End Using End Function Read File with Encoding (using default encoding…
Read MoreAuthor: Mayank Nainwal
Interview questions for SQL server jobs
For all the software developers interested in working on SQL server, we bring you a set of interview questions asked by one of the top IT giants – Tech Mahindra. These questions have been posted by techies – who are presently working with Tech Mahindra, or have previously worked with the IT giant.
Read MoreRun Command in Windows
‘Run’ dialogue in Microsoft Operating system provides the execution of various commands without opening the Command Prompt, although Command Prompt have its own features and usability. Microsoft windows operating system provides much flexibility to users in terms of Design, Development and Distribution of Application either Windows Based Application or Web Based Application. We can execute any command using ‘Run’ : Press “Windows” Button + “R” Button on your keyboard simultaneously.
Read MoreOpen Internet Explorer from Command
Microsoft operating system have pre-installed web browser ‘internet explorer’. But with the emerging of Windows 8, 8.1, 10 Microsoft is focusing More in its Browser Microsoft Edge rather than Internet Explorer. Microsoft Edge have many new features and functionalities that makes it better than internet explorer and make it stand with other competitive web browsers. But there are some applications (specially java applet based and Digital Signature Based) that requires internet explorer to work properly. Following are the steps to open internet explorer : Open Windows Run (Windows Key +…
Read MoreRun Command in Windows as Administrator
Microsoft windows operating system provides much flexibility to users in terms of Design, Development and Distribution of Application either Windows Based Application or Web Based Application. Sometime it is required to run specific commands As Administrator as Current user have some limited rights or user want to install or change a windows setting that is not possible by the current user rights. Running a Command As Administrator provides the ‘Admin’ privilege to the executing Assembly (Exe or Any File). To Run a command As Administrator : Press Windows Button…
Read More