Skip to main content

Posts

Showing posts from September, 2013

how to create installer with database file inside

Check this link Streamline Your Database Setup Process with a Custom Installer. http://msdn.microsoft.com/en-us/magazine/cc163919.aspx Keep in mind it is just an example but you should be able to see the idea and create your own installer. Depending on how you are creating your setup project, you will have to follow that technology's guidelines. Check out this site.  http://wixtoolset.org/

What is the difference between Java and C#

What is the difference between Java and C# 1. Both are programming languages having same basic concept but syntactically different... We use Java for mobile development where as c sharp in .net development. 2.Java and c# are only almost the same with just a few variation on some keywords. one of the major difference is that java class can inherit multiple classes where c# classes don't. 3.Java can't accept multiple inheritance and it's the same case for c# , c++ can accept multiple inheritance. 4.C# share the same syntax, execution model and run time features( virtual machine , garbage collection,...) and cross platform , C# add features like cross language interoperability. C.C# have very nice features that java didn't have like linq and functional programming using lambda expressions. 5.C# is that every new feature is the result of c# developers suggestions around the world.Also feature like optional and named parameters are aimed to make ...

Example of code of c sharp with SQL Server connectivity

using System; using System.Data; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; using System.Drawing; namespace DatabaseExp { public partial class DatabaseExp : Form { SqlConnection conn; SqlDataAdapter adaptr; SqlCommand cmd; DataTable tbl; static int count = 0, current = 0; static int check = 0; public DatabaseExp() { InitializeComponent(); } private void DatabaseExp_Load(object sender, EventArgs e) { string connectionString = null; adaptr = new SqlDataAdapter(); tbl = new DataTable(); connectionString = "Data Source=127.0.0.1;Initial Catalog=Abdul;User ID=sa;Password=allah"; conn = new SqlConnection(connectionString); try { conn.Open(); MessageBox.Show("Connection Open !", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); //conn.Close(); } catch (Exception ex) { Message...

C sharp Code to Send Email From G Mail to any other mail Address

Bubble sort Algorithm with two dimensional Array using c sharp

In bubble sort algorithm, we pick the two elements of the collection one by one from the start and compare them. If first element is larger than the second element then we swap them, and then continue the procedure till the end of the collection. Like see we have a string array like below string[] str = {"e","c","b","d","a" }; so, first we will pick first two elements and will compare them if(e>c) {  // we will swap both the elements.  // so our array will be like this now  str = {"c","e","b","d","a" }; } In next step we will pick the elements e , b and will compare them same rule will apply on it. If firs one will be greater then the second one then we will swap them then the array will be look like this: str = {"c","b","e","d","a" }; we will continue the process until we got the whole array in the sorted form. c...