Files.TempFileName Method

NSG Library

FilesTempFileName Method

Create a temporary file name.

Namespace:  NSG.Library.Helpers
Assembly:  NSG.Library.Helpers (in NSG.Library.Helpers.dll) Version: (
public static string TempFileName(
	string prefix = "tmp",
	string extent = "txt"
Public Shared Function TempFileName ( 
	Optional prefix As String = "tmp",
	Optional extent As String = "txt"
) As String
static String^ TempFileName(
	String^ prefix = L"tmp", 
	String^ extent = L"txt"
static member TempFileName : 
        ?prefix : string * 
        ?extent : string 
(* Defaults:
        let _prefix = defaultArg prefix "tmp"
        let _extent = defaultArg extent "txt"
-> string 


prefix (Optional)
Type: SystemString
first part of file name
file 'prefix' examples:
  • tmp
  • ni (as in app initials)
  • nsg (as in company initials)
extent (Optional)
Type: SystemString
the temporary file name extension:
file 'extent' examples:
  • txt
  • tmp
  • log

Return Value

Type: String
between the prefix and the extent is a GUID
See Also