The Path class contains methods that can be used to parse a given path. Using these classes is much easier and less error-prone than writing path- and filename-parsing code. There are five main methods used to parse a path: GetPathRoot, GetDirectoryName, GetFileName, GetExtension, and GetFileNameWithoutExtension. Each has a single parameter, path, which represents the path [...]
Popularity: 3% [?]
If you have one or more complex regular expressions that may exist in a file outside of your code, you need a way to place comments within the regular expression itself. These comments will aid others in being able to read and maintain your regular expressions later on.
Add comments to the regular expression using the [...]
Popularity: 6% [?]
You need a quick list from which to choose regular expression patterns that match standard items. These standard items could be a Social Security Number, a zip code, a word containing only characters, an alphanumeric word, an email address, a URL, dates, or one of many other possible items used throughout business applications.
Regular expressions are [...]
Popularity: 2% [?]
This time the article shows you how to find a specific occurrence of a match within a string. For example, you want to find the third occurrence of a word or the second occurrence of a Social Security Number. In addition, you may need to find every third occurrence of a word in a string.
To [...]
Popularity: 2% [?]
This article shows on how to get a directory tree, potentially including filenames, extending from any point in the directory hierarchy. In addition, each directory or file returned must be in the form of an object encapsulating that item. This will allow you to perform operations on the returned objects, such as deleting the file, [...]
Popularity: 4% [?]
This article shows how we can use Regular Expression to search a specific character pattern in a string or file that contains multiple lines. When it is found on a line, the entire line is returned, instead of just the matched text. The method use the StreamReader.ReadLine method to obtain each line in a file [...]
Popularity: 2% [?]
When communication with external device like through Serial Comm port, you might need to use byte array to do so. In .NET, The BitConverter class provides an overloaded static method GetBytes that take most of the standard value types and return the value encoded as an array of bytes. Support is provided for [...]
Popularity: 3% [?]