Kategori

C Sharp

  • Jumlah Kode: 5
  • Update Kode Terbaru: Sep 06' 13
  • Jumlah Halaman : 1
  • Anda berada di halaman : 1

Send Email Through Console

  • 2013-09-06
  • 933

Here is a listing to send an email from C # using the console: using System; using System.Collections.Generic; using System.Text; using System.Net.Mail; using System.Net; class Program { static void Main(string[] args) { Console.WriteLine("emailtujuan@domain.com"); MailAddress to = new MailAddress(Console.ReadLine()); Baca kanjut


Reading From Database

  • 2013-11-14
  • 476
  • C#,code,program,icodeformoney

In this section, we still using the same database as the previous section which is created by the following queries: #Create database CREATE DATABASE IF NOT EXISTS campus; #Activate database USE campus; #Create table CREATE TABLE IF NOT EXISTS students ( id INT PRIMARY KEY AUTO_INCREMENT, fullname VARCHAR(100), gender VARCHAR(10), faculty VARCHAR(50), Baca kanjut


Database Connection

  • 2013-11-14
  • 482
  • C#,program,icodeformoney

To use database in C#, we must first connect to the database. To do that, we use a Connection object. In this case, we use MySqlConnection class. Basically, the code to connect to a database are:var conn = new MySqlConnection();conn.ConnectionString = "Server=localhost; Uid=root; Pwd=123; Port=3306;";conn.Open();//Do something to the Baca kanjut


Variables

  • 2013-11-14
  • 311
  • C#,program,icodeformoney

A variable is just a storage for data of values in the program. In programming world, every variables has a datatype and in most programming language, C# included, a variable's datatype is determined when the variable is declared or initialized. There are several ways to declare a variable: [data type] [identifier];[data type] [identifier] = [value];[data type] [identifier Baca kanjut


C# LINQ

  • 2013-11-21
  • 276
  • Programming,C#,.Net

LINQ (Language-Integrated Query) in C# is a simple way to query and update a Collection of data. We can use LINQ for example to filter, sort or even merge data in collections. The simplest way to use LINQ is: from [itemIdentifier] in [collection] where [condition] select [itemIdentifier] Below are examples of LINQ usage:class Program {  static void Baca kanjut




Kategori