You can use the following code, if you want to get file names in a directory using C#:
using System;
using System.IO;
class Program
{
static void Main()
{
string[] array1 = Directory.GetFiles(@"C:\");
// Put all txt files in root directory into array2.
string[] array2 = Directory.GetFiles(@"C:\", "*.txt");
Console.WriteLine("Files:");
foreach (string name in array1)
{
Console.WriteLine(name);
}
// Display all txt files.
Console.WriteLine("txt Files:");
foreach (string name in array2)
{
Console.WriteLine(name);
}
}
}
30 Eylül 2009 Çarşamba
Running C# on Command Prompt
using System;
class Hello {
public static void Main () {
Console.WriteLine ("Hello World");
}
}
class Hello {
public static void Main () {
Console.WriteLine ("Hello World");
}
}
Save the file as hello.cs.
Go to the necessary directory and type csc hello.cs to compile.
If compilation was successful, hello.exe is created in that directory. You can run it by typing hello to the command prompt.
That's it.
Good programming!
Etiketler:
c# command prompt,
c# visual c++ express,
compile c#
7 Eylül 2009 Pazartesi
Youtube: An error occurred, please try again later
Youtube'da video izlemek isterken, bu hatayı alıyorsanız, aşağıda belirtilenleri uygulamanız probleminizi çözecek:
Windows kullanıcıları için: Yerel ağ bağlantısı -> Özellikler -> TCP-IP > DNS ata > Üst kısma 208.67.222.222 / Alt kısma 208.67.222.220 (Kablosuz ağ kullananlar çözüm için yazının yorumlarına bakabilir.)
MacOS kullanıcıları için: System Preferences -> Network -> Advanced -> DNS -> artı işaretine basarak yeni adres ekliyoruz: 208.67.222.222 -> Apply ve OK
Artık Youtube videolarını izleyebilirsiniz.
24 Temmuz 2009 Cuma
Removing Stumbi from Safari (for MacOS)
Stumbi is the Safari version for StumbleUpon in Mozilla Firefox. But it has some other characteristics such as being able to be used only for a limited time. Then you have to pay for Stumbi, whereas StumbleUpon requires no paying at all.
So, when the limited time was over, I decided to delete Stumbi dmg(exe) file, but then I ran into problems. Safari started to crash. I could not find how to remove Stumbi from Safari tabs.
Later I have found the solution: You should go to the web page where you can download Stumbi and download it again. After the download, you will see a screen where you can choose between "installing" and "removing". And that's it! You choose removing and the problem is solved.
Etiketler:
delete stumbi,
remove stumbi,
remove stumbi from safari
15 Temmuz 2009 Çarşamba
Her Gün Yeni Birşeyler Öğren!
Öğrendiğim ilginç bilgileri veya edindiğim ilginç deneyimleri paylaştığım blogum:
Etiketler:
bunu bugun ogren,
bunu bugün öğren,
yeni bir şey öğren
17 Haziran 2009 Çarşamba
Toefl'a Hazırlık
Toefl'a hazırlanmak ve bir fikir edinmek için ücretsiz yardımsever sitelerden bazıları:
http://www.4tests.com/exams/examdetail.asp?eid=57
http://www.examenglish.com/TOEFL/index.php
http://www.stuff.co.uk/toefl.htm
http://www.testwise.com/review.html
http://www.4tests.com/exams/examdetail.asp?eid=57
http://www.examenglish.com/TOEFL/index.php
http://www.stuff.co.uk/toefl.htm
http://www.testwise.com/review.html
Etiketler:
Toefl,
toefl hazırlık,
toefl'a hazırlanma
15 Mayıs 2009 Cuma
Unknown server tag error
In the case of an error of "Unknown server tag" format regarding AjaxControlToolkit, you should add the first line of code marked in the figure to the web.config as follows:
<add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit"/>

With this trick, you not only solve your problem, but also you won't have to write
<add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit"/>

With this trick, you not only solve your problem, but also you won't have to write
<%@ Register Assembly="AjaxControlToolkit" TagPrefix="cc1" Namespace="AjaxControlToolkit" %>
anymore to each page to use Ajax elements.
Etiketler:
unknown server tag
Kaydol:
Kayıtlar (Atom)
