Home > Net >  Vb.net, how to get to open the file format?
Vb.net, how to get to open the file format?

Time:10-12

Such as the program to open the student performance. TXT, I wanted to get. TXT this format,,, how to write code for help

CodePudding user response:

Dim path="X: \ path \ to file"
Dim ext=System. IO. Path. GetExtension (Path. The ToString (). The Substring (Path. The ToString (). The IndexOf (". ")))

CodePudding user response:

reference 1st floor ManBOyyy response:
Dim path="X: \ path \ to file"
Dim ext=System. IO. Path. GetExtension (Path. The ToString (). The Substring (Path. The ToString (). The IndexOf (". ")))
greasy harm!!!!!! Good, thank god

CodePudding user response:

refer to the second floor weixin_45407684 response:
Quote: refer to 1st floor ManBOyyy response:
Dim path="X: \ path \ to file"
Dim ext=System. IO. Path. GetExtension (Path. The ToString (). The Substring (Path. The ToString (). The IndexOf (". ")))
greasy harm!!!!!! Good, thank you for your great god

Dim path="X: \ path \ to file"
Dim ext=path. The ToString (). The Substring (path. The ToString (). The IndexOf (". "))
Dim ext111=System. IO. Path. GetExtension (Path)

Can both of them

CodePudding user response:

 
using System;

The namespace ConsoleApp2
{
Class Program
{
The static void Main (string [] args)
{
System. IO. Path. GetExtension (" c: \ \ SDF DFF ")
}
}
}



 
The Module Module1

Sub Main ()
System. IO. Path. GetExtension (" d: \ \ test. FFFS)
End Sub

End the Module

CodePudding user response:

C # and VB are OK