22 Temmuz 2018 Pazar

Proje 1 - UnivApp




UnivApp

Proje, İngilizce dilinde yazılmıştır. ASP.Net MVC ile geliştirilmiştir. BootStrap kullanılmıştır.

Öğretmenler ders eklemekte, öğrenciler ise bu derslere kayıt olmaktadır. Öğretmenler belirli departmanlar içinde barınmaktadır.

Tablolar içerisinde One to Many, Many to Many ilişkileri kullanılmıştır.


Liste içindeki veriler ad, soyad, kayıt tarihi gibi bilgilere göre A'dan Z'ye kadar sıralanabilmektedir. Paging işlemi PagedList kullanılarak gerçekleştirilmiştir.


Öğrencilerin adına veya soyadına göre Search işlemi yapılabilmektedir.






Öğretmenler Listesi'nden herhangi bir öğretmen seçildiğinde, yeni bir liste oluşturularak bu liste içinde öğretmenin verdiği dersler gösterilmektedir.
Açılan yeni listede gösterilen dersler seçildiğinde yine yeni bir liste açılmakta, bu listede ise bu derslere kayıt yaptırmış olan öğrenciler gösterilmektedir. 




20 Şubat 2018 Salı

(3/3) Passing argument by Output


// Passing By Output // Passing by output is similar to Reference params. Except that Output params transmit data // out of the method, not accept data in it. Passing by Output technic defined by "out" keyword. // So you will use "out" keyword for this purpose. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NewSandbox { class Program { static void YourMethod(out int x, out int y) { x = 4; y = 6; } static void Main(string[] args) { int x, y; YourMethod(out x, out y); Console.WriteLine(x); //output will be 4 Console.WriteLine(y); //output will be 6 Console.ReadKey(); } } }

(2/3) Passing argument by Reference


using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void YourMethod(ref int m) { m = m * m; } static void Main(string[] args) { int number = 5; YourMethod(ref number); // Now the "number" variable has affected Console.WriteLine(number); //output will be 25. NOT 5. Console.ReadKey(); } } }

(1/3) Passing argument by Value

// 1) Passing By Value // C# creates a copy of the given variable's value and put it // into the method's parameter. Ergo you can do any changes you // want on the parameter within the method without making any // changes on the argument. I.e you are changing only the "Copy // of the Argument's Value". Not given argument or argument's value. // -By default, C# will use -By Value- technic to passing the arguments. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NewSandbox { class Program { static void YourMethod(int m){ m = m*m; } static void Main(string[] args) { int number = 5; YourMethod(number); //output will be 5 } } } // Brief explanation: The method will operate on the VALUE, not the ACTUAL VARIABLE.

19 Şubat 2018 Pazartesi

Csharp'ta if - else if arasındaki fark -45


using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Text; namespace _138_if_else_if_arasındaki_fark__45 { class Program { static void Main(string[] args) { //Örnek 1 int theSayi = 3; if (theSayi == 3) { Console.WriteLine("Sayı: " + theSayi); } if (theSayi == 4) { Console.WriteLine("Sayı: " + theSayi); } if (theSayi == 5) { Console.WriteLine("Sayı: " + theSayi); } if (theSayi == 6) { Console.WriteLine("Sayı: " + theSayi); } if (theSayi == 7) { Console.WriteLine("Sayı: " + theSayi); } /* If metodunda: Yazdığın if metodu başarıyla çalışmışsa eğer; yine de ileriki satırlarda bulunan if'ler de çalışır. Else if konusunda durum farklıdır: Kullandığımız else if satırlarının birini başarıyla çalıştırmışsak eğer; ileriki satırlarda bulunan else if satırları yok yere okunmaz. Örneğin theSayi == 3 olduğunu biliyor isek; artık sayının 4 veya 5 olmadığını biliyor oluruz. Bu yüzden ileriki satırlarda "if" ile tekrar theSayi == 4 mü, thesayi == 5 migibi sorguları yaparak programımızın performansını düşürmemiş oluruz. Bu yüzden "else if" kullanırız */ //Örnek 2 int number = 3; if (number == 444) { Console.WriteLine("Sayı: " + number); } else if (number == 4) { Console.WriteLine("Sayı: " + number); } else if (theSayi == 3) { Console.WriteLine("Sayı: " + number); } else if (theSayi == 6) { Console.WriteLine("Sayı: " + number); } else if (theSayi == 7) { Console.WriteLine("Sayı: " + number); } Console.ReadKey(); // Sonuç: Örnek 1 de tüm satırlar incelendi; // Örnek 2 de; Başarıyla çalışan else if metodundan // sonraki else if metodları yok yere çalışmamış oldu. } } }