This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE CONSTRAINT_DEMO2 | |
( | |
ID INT, | |
NAME VARCHAR(25) NOT NULL, | |
AGE INT, | |
ADDRESS VARCHAR(25) DEFAULT 'BANGALORE', | |
CONSTRAINT PK_ID2 PRIMARY KEY(ID), --TABLE LEVEL | |
CONSTRAINT CK_AGE CHECK(AGE>18) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--PRIMARY KEY | |
CREATE TABLE DEPT | |
( | |
DNO INT PRIMARY KEY, | |
DNAME VARCHAR(25) | |
) | |
--INSERT (DEPT TABLE) | |
INSERT INTO DEPT VALUES(1, 'HR'); | |
INSERT INTO DEPT VALUES(2, 'DOTNET'); | |
INSERT INTO DEPT VALUES(3, 'JAVA'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--CREATE DATABASE | |
create database DLithe | |
use DLithe | |
create table trainees | |
( | |
ID int NOT NULL, | |
Name varchar(25) NOT NULL | |
); | |
--INSERT RECORDS INTO THE TABLE | |
insert into trainees values(1, 'Charan'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace EmployeeInfo | |
{ | |
class PartialClass2 | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace EmployeeInfo | |
{ | |
class PartialClass1 | |
{ | |
} | |
public partial class EmployeeDetails | |
{ | |
private int empID; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace CalculatorApplication { | |
class NullablesAtShow { | |
static void Main(string[] args) { | |
int? num1 = null; | |
int? num2 = 45; | |
double? num3 = new double?(); | |
double? num4 = 3.14157; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
namespace FileIOApplication | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
FileStream F = new FileStream("test.txt", FileMode.OpenOrCreate, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace GenericApplication | |
{ | |
public class MyGenericArray<T> | |
{ | |
private T[] array; | |
public MyGenericArray(int size) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace PolymorphismApplication | |
{ | |
class Shape | |
{ | |
protected int width, height; | |
public Shape(int a = 0, int b = 0) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace DLithe | |
{ | |
public class A | |
{ | |
public string Name; | |
public void GetName() // () | |
{ | |
Console.WriteLine("Name: {0}", Name); |