public IActionResult DecryptionText(string cryptomsg, string key) { myclass op = new myclass(); Decryption_Class op2 = new Decryption_Class(); string str = op2.BinaryToString(op2.convert_DNA_to_binary(op2.convert_finalDNA_to_DNA(op2.split_DNA(cryptomsg)))); op.orignalmsg = XXTEA.Decrypt(str, key); //decryption // op.cryptomsg = XXTEA.Decrypt(orignalmsg, key); string document = op.orignalmsg; //decryption // op.cryptomsg = XXTEA.Decrypt(orignalmsg, key); //create file or put Encrypt message in file //path which file put in string path_Root = _hosting.WebRootPath; string docPath = path_Root + "\\files\\"; // Write the specified text asynchronously to a new file named "WriteTextAsync.txt". using (StreamWriter outputFile = new StreamWriter(Path.Combine(docPath, "Decryptmessage.txt"))) { outputFile.Write(document); } return(View("DecryptionText", op)); }
void Start() { List <string> list = new List <string>(); myclass testclass = new myclass(); foreach (var keyvalue in testclass.testDic) { list.Add(keyvalue.Key); } list.Sort((k1, k2) => { if (testclass.testDic[k1] > testclass.testDic[k2]) { return(-1); } else if (testclass.testDic[k1] < testclass.testDic[k2]) { return(1); } return(0); }); for (int i = 0; i < list.Count; ++i) { Debug.Log(list[i]); } }
public static void Main() { myclass mc = new myclass(); mc.x = 10; Console.WriteLine("mc.x = {0}", mc.x); }
static void Main() { mycl c = new mycl(); myclass cl = new myclass(); c.MyDelEvent += new Del(cl.ShowDel); c.RaiseMyDelegateEvent("Hello world"); }
static void Main(string[] args) { myclass myobj = new myclass(); myobj.i = 10; myobj.printi(); }
static void Main(string[] args) { myclass ob1 = new myclass(); ob1.show(); Console.ReadLine(); return; }
public static void Main() { myclass s = new myclass(); int x = 10, y = 20; s.swap(ref x, ref y); Console.WriteLine("x = {0}, y = {1}", x, y); }
public static void Main() { string str1 = "犬", str2 = "猫"; myclass s = new myclass(); s.swap(str1, str2); Console.WriteLine("Main:str1 = {0}, str2 = {1}", str1, str2); }
static void Main(string[] args) { myclass k = new myclass(6, 6); k.show(); Console.ReadLine(); return; }
public ActionResult ShowHotelReserves(string username) { myclass Myclass = new myclass(); username = User.Identity.Name; var res = Myclass.GetHotelReserveByUername(username); return(View(res)); }
public static myclass CreateInstance() { if (singleobj == null) { singleobj = new myclass(); } return singleobj }
static void Main(string[] args) { myclass objmyclass = new myclass(); //here we create a object of class whose name is objmyclass objmyclass.myprocedure(); // i call a method procedure objmyclass.myfunction(); // i call a method function string value = objmyclass.myfunction(); // save a value of object of mthd function in value Console.WriteLine(value); //print value }
static void Main(string[] args) { myclass k = new myclass(); k.set_HCN(); Console.WriteLine("Chu vi HCN la : " + k.getChuVi()); Console.WriteLine("Dien tich HCN la : " + k.getDienTich()); Console.ReadLine(); return; }
static void Main(string[] args) { myclass obj = new myclass(); obj.b = true; while (obj.notEnough()) { Thread.Sleep(5); } }
public static void Main() { myclass mc1 = new myclass(18); myclass mc2 = new myclass("雪音クリス"); myclass mc3 = new myclass("立花響", "ガングニール", 17); mc1.show(); mc2.show(); mc3.show(); }
static void Main(string[] args) { myclass.i = 100; myclass ob1 = new myclass(); myclass ob2 = new myclass(); //ob1.seti(10); Console.WriteLine("Gia tri ob1: {0}", ob1.geti()); Console.WriteLine("Gia tri ob2: {0}", ob2.geti()); Console.ReadLine(); }
static void Main(string[] args) { myclass ob1 = new myclass(); myclass ob2 = new myclass(); ob1.set_a(10); ob2.set_a(99); Console.WriteLine("Gia tri a cua doi tuong ob1: {0}", ob1.get_a()); Console.WriteLine("Gia tri a cua doi tuong ob2: {0}", ob2.get_a()); Console.ReadLine(); }
static void Main(string[] args) { //Console.WriteLine("Nhapvao:"); // int a = int.Parse(Console.ReadLine()); myclass ob1 = new myclass(4); //thay 4 = a ta se nhap duoc du lieu ob1.show(); Console.ReadLine(); return; }
public static void Main(String [] args) { Console.WriteLine(Thread.CurrentThread.GetHashCode()); myclass my = new myclass(); if(count == 0) { Thread thr = new Thread(new ThreadStart(myclass.mymethod)); thr.Start(); Console.WriteLine("Aborting thread"); thr.Abort(); } }
static void Main(string[] args) { var c = new myclass(); int counter = 0; for(int x = 0 ; x < 100 ; x++) { if(c.Go() != 0) { Console.WriteLine("Iteration {0} doesn't = 0", x); } } }
static void Main(string[] args) { // khai bao cac doi tuong moi myclass ob1 = new myclass(); myclass ob2 = new myclass(); ob1.set_a(10); ob2.set_a(99); Console.WriteLine("gia tri a cua ob1: {0}", ob1.get_a()); Console.WriteLine("gia tri a cua ob12: {0}", ob2.get_a()); Console.ReadLine(); }
public void Moq_Should_Verify_Setup() { //Arrange var mockAwesome = new Mock <IAwesome>(); mockAwesome.Setup(x => x.RunSomething()).Verifiable(); //Act var sut = new myclass(mockAwesome.Object); sut.MethodUnderTest(); //Assert mockAwesome.Verify(); }
static void Main(string[] args) { myclass myobj = new myclass(); myobj.i = 10; myobj.printsome(); otherclass myobj3 = new otherclass(); myobj3.i = 11; myobj3.x = 2; myobj3.printsome(); }
static void Main() { myclass my = new myclass(); Thread t1 = new Thread(new ThreadStart(my.readFile)); Thread t2 = new Thread(new ThreadStart(my.writeFile)); Thread t3 = new Thread(new ThreadStart(my.readFile)); Thread t4 = new Thread(new ThreadStart(my.writeFile)); t1.Start(); t4.Start(); t2.Start(); Thread.Sleep(1000); t3.Start(); }
static void Main(string[] args) { unsafe { int x = 10; int y = 20; int * t1 = &x; int * t2 = &y; myclass m1 = new myclass(); m1.swap(t1, t2); Console.WriteLine("Main"); Console.WriteLine("x: " + x); Console.WriteLine("y: " + y); Console.ReadLine(); } }
static void Main() { exe e = new exe(); myclass.ten += new IncrementValue(e.OnTen); myclass.twenty += new ShowTen(e.OnTwenty); myclass.thirty += new ShowTen(e.OnThirty); myclass.countSet += new CountInitialized(e.showCount); try { myclass cl = new myclass(); cl.Count = 40; cl.runloop(); } catch(NegativeException ng) { Console.WriteLine(ng.Message); } }
static void Main(string[] args) { myclass mc1 = new myclass(); myclass mc2 = new myclass(); mc1.instMemember = 1; mc1.instMemember = 1; myclass.staticmember = 100; Console.WriteLine("mc1: instmember = {0}, stat mem: = {1}", mc1.instMemember, mc1.getstaticvalue()); Console.WriteLine(); Console.WriteLine("mc2: instmember = {0}, stat mem: = {1}", mc2.instMemember, mc2.getstaticvalue()); myclass.staticmember = 500; Console.WriteLine("mc1: instmember = {0}, stat mem: = {1}", mc1.instMemember, mc1.getstaticvalue()); Console.WriteLine(); Console.WriteLine("mc2: instmember = {0}, stat mem: = {1}", mc2.instMemember, mc2.getstaticvalue()); }
public IActionResult Text(string orignalmsg, string key) {// Encryptclass ecrypt = new Encryptclass(); myclass op = new myclass(); Encryption op2 = new Encryption(); op.orignalmsg = orignalmsg; string str = XXTEA.Encrypt(op.orignalmsg, key); op.cryptomsg = op2.convert_to_RNA(op2.convert_to_dna(op2.split_binary(op2.StringToBinary(str)))); string document = op.cryptomsg; //decryption // op.cryptomsg = XXTEA.Decrypt(orignalmsg, key); //create file or put Encrypt message in file //path which file put in string path_Root = _hosting.WebRootPath; string docPath = path_Root + "\\files\\"; // Write the specified text asynchronously to a new file named "WriteTextAsync.txt". using (StreamWriter outputFile = new StreamWriter(Path.Combine(docPath, "Encryptmessage.txt"))) { outputFile.Write(document); } return(View("Text", op)); }
protected void Button1_Click(object sender, EventArgs e) { myclass abc = new myclass(); Label1.Text = abc.callme(); }
public Myclass func(myclass item) { Myclass item = new myClass(); // first create a class return(item); //since myclass in in the header, we need to return a myclass }
public static void Main() { myclass cl = new myclass("aarif", "khan", "hasan"); Console.WriteLine(cl.getFullName()); }
static void Main(string[] args) { myclass myobj = new myclass(); myclass myobj2 = new myclass(myobj); myclass myobj3 = new myclass(10); }
public myclass(myclass prevclass) { Console.WriteLine("Class copied"); }