C++/CLI code snippets
Collection of C++/CLI code snippets
Recent articles in C++/CLI Code Snippets
- Populate ComboBox using DataTable. C++/CLI code snippet CreateDropDownMenu to populate ComboBox dropdown menu with given DataTable.
- C++/CLI Code Snippet - AddSlashes StripSlashes Escape String. C++/CLI code snippet AddSlahes tool allows quote a string with slashes (Escape String). Stripslashes snippet un-quotes a quote string by removing slashes.
- C++/CLI Code Snippet - Access current environment directories and logical drives. C++/CLI code snippets to access current environment directories such as current directory, system directory and logical drives.
- C++/CLI Code Snippet - Convert Unix timestamp. C++/CLI code snippets convert date/time between DateTime and Unix timestamp. Most .Net base applications never use Unix timestamp, but if you want to create a application to interact with other application or sites, maybe built in PHP or Java, use these methods to convert Unix timestamp.
- C++/CLI Code Snippet - Upload file to FTP Server. C++/CLI code snippet upload file to FTP Server. This method login to FTP server using username and password and upload the local file to given FTP location.
- C++/CLI Code Snippet - Validate (int) Integer. C++/CLI code snippets return the validated int value by checking validity of the given int and checking the int value range within the given minimum and maximum int range.
- C++/CLI Code Snippet - Find starting and ending date for given date. C++/CLI code snippets return the Ending Date and Starting Date for given date. Simply pass DateTime value that need to find date and snippets will return starting and ending date as DateTime.
- C++/CLI Code Snippet - Get local computer host name. C++/CLI code snippet get the host name from the local machine.
- C++/CLI Code Snippet - Get local computer IP address. C++/CLI code snippet get the IP address from the local machine. For computers with multiple IP addresses with one or more NIC cards can use IP address object list to obtain all the IP addresses.
- C++/CLI Code Snippet - Compile C# or VB source code run-time. C++/CLI code snippet compile C# or VB source code run-time from a text string or external text file and build the executable. Programmatically compile code using C#/VB compiler.
- C++/CLI Code Snippet - Save object to file. C++/CLI code snippet save object to external file. This function can be use to serialize objects into byte array and save them in external file.
- C++/CLI Code Snippet - Load object from binary file. C++/CLI code snippet open an external binary data file and convert it to object. This function can be use to deserialize those byte array data (Serialized) from external file to their original objects.
- C++/CLI Code Snippet - Byte array to object. C++/CLI code snippet convert byte array to object. This function useful to convert back byte array data to its original object representation. This function can be use to deserialize those byte array data (Serialized) to their original objects.
- C++/CLI Code Snippet - Object to byte array. C++/CLI code snippet convert object to byte array. This method useful to store binary data in files. This function can be use to convert any object to byte array and store them in database.
- C++/CLI Code Snippet - Save byte array to file. C++/CLI code snippet save byte array in to an external file. This function useful to store binary data in files. This function can be use when retrieving binary data from database and save it to an external file.
- C++/CLI Code Snippet - Convert file to byte array. C++/CLI code snippet convert external file to byte array. Converting file into byte array important to store binary file in database, send to other systems using remoting.
- C++/CLI Code Snippet - Execute Shell Commands from .Net. C++/CLI code snippet creates a command process and then invokes the command that we want to execute. The result of the command and any errors occurred during execution is stored in a string variables. This is a great method to execute your DOS commands from .Net.
- C++/CLI Code Snippet - Download File from URL. C++/CLI code snippet download file from URL and save it on local drive. These code snippets discuss both asynchronous file download method and DownloadFile method (to block thread while waiting for the download).
- C++/CLI Code Snippet - Download Image from URL. C++/CLI code snippet download image from URL. This function download image using web response stream.
- C++/CLI Code Snippet - Download HTML Web Page. C++/CLI code snippet download web page HTML source contents.
- C++/CLI Code Snippet - Send Email Using SMTP Server. C++/CLI code snippet connects to SMTP Email Server and send email message. SendEmail send email using SMTP email server.
Recent articles in C++/CLI Code Snippets
- C++/CLI Code Snippet - Insert/Update Image To SQL Server. C++/CLI code snippet connects to SQL server and executes SQL statement and update/insert binary image data in database table. InsertUpdateImage update/insert image into database using open database connection, insert/update SQL statement, binary image and image format.
- C++/CLI Code Snippet - Get Identity Column Value from SQL Server. C++/CLI code snippet connects to SQL server and executes SQL statement and returns the identity value. ExeSQLReturnLong execute SQL statement using ExecuteScalar method and return identity value as a long. ExeSQLReturnObject execute SQL statement using ExecuteScalar method and return identity value as an object.
- C++/CLI Code Snippet - ExecuteNonQuery against the SQL Server Database. C++/CLI code snippet connects to SQL server and executes a SQL statement and returns the number of rows affected. ExecuteNonQuery returns number of rows affected using open database connection and SQL statement.
- C++/CLI Code Snippet - Check Record Exists in SQL Server Database. C++/CLI code snippet connects to SQL server and executes SQL statement to determine whether the given record exists in the database. RecordExists returns logical (True/False) using open database connection and SQL statement.
- C++/CLI Code Snippet - Get Image from sql server. C++/CLI code snippet connects to SQL server and executes SQL statement and returns the Image data. ScalarToImage returns an Image using open database connection and SQL statement.
- C++/CLI Code Snippet - Get Scalar using open connection. C++/CLI code snippet connects to SQL server and executes SQL statement and returns the first column of the first row in the result set returned by the query as a object. ExecuteScalar returns an object using open database connection and SQL statement.
- C++/CLI Code Snippet - Get XmlReader using open connection. C++/CLI code snippet connects to SQL server and executes SQL statement and return XmlReader. ExecuteXmlReader returns XmlReader using open database connection and SQL statement.
- C++/CLI Code Snippet - Get DataTable using open connection. C++/CLI code snippet connects to SQL server and executes SQL statement and return DataTable. GetDataTable returns DataTable using open database connection and SQL statement.
- C++/CLI Code Snippet - Get First Row As Object Array From SqlDataReader. C++/CLI code snippet execute a SQL statement using open database connection and return all the columns data in SqlDataReader for first row. GetSqlDataReaderFirstRow execute and close SqlDataReader and returns first data row as a dictionary object array.
- C++/CLI Code Snippet - Get Data From SqlDataReader. C++/CLI code snippet connects to SQL server and executes SQL statement and return SqlDataReader. FunctionSqlDataReader returns SqlDataReader for given database connection string and SQL statement.
- C++/CLI Code Snippet - Get Data From SqlDataReader using open connection. C++/CLI code snippet connects to SQL server and executes SQL statement and return SqlDataReader. GetSqlDataReader returns SqlDataReader using open database connection and SQL statement.
- C++/CLI Code Snippet - Remove White Spaces. C++/CLI code snippet to remove all white spaces from a string. TrimWhiteSpace strip all white spaces from a given.
- C++/CLI Code Snippet - Remove HTML Tags. C++/CLI code snippet to remove all HTML TAGS from a string. StripHTML strip all HTML tags from a given string and return plain text.
- C++/CLI Code Snippet - Extract Numeric values. C++/CLI code snippet to extracts all the numeric values from a string. ExtractNumbers returns string array of numeric values successful matches by iteratively applying a regular expression pattern to the input string.
- C++/CLI Code Snippet - Extract Emails. C++/CLI code snippet to extracts all the Emails from a string. ExtractEmails returns string array of Emails successful matches by iteratively applying a regular expression pattern to the input string.
- C++/CLI Code Snippet - Extract URLs. C++/CLI code snippet to extracts all the URLs from a string. ExtractURLs returns string array of URLs successful matches by iteratively applying a regular expression pattern to the input string.
- C++/CLI Code Snippet - Validate whole number. C++/CLI code snippet to validate given whole number. IsWholeNumber function validates positive integers with zero inclusive. Function return TRUE if valid whole number found, if not function will return FALSE.
- C++/CLI Code Snippet - Validate Integer. C++/CLI code snippet to validate given integer. IsInteger function validate integer both positive and negative. Function return TRUE if valid integer found, if not function will return FALSE.
- C++/CLI Code Snippet - Validate Email Address. C++/CLI code snippet to validate given email address. IsValidEmail function validate email address. Function return TRUE if valid email address found, if not function will return FALSE.
- C++/CLI Code Snippet - Returns current UNIX timestamp. C++/CLI code snippet to return current UNIX timestamp. UnixTimeNow() returns current UNIX timestamp