skip to main | skip to sidebar

OPEN SOURCE

Linux for Better life

  • Home
  • Trik-Tips
  • Free Template
  • Blogger Hack
  • Free Ebook

C Sharp

ARRAY

using System;

namespace Arrays
{
class Arrays
{
public static void PrintArray(int[] myInts)
{
for(int i = 0; i <>

public static string[] GetStringArray()
{
string[] theStrings = {"Hello", "from", "GetStringArray"};
return theStrings;
}

public static int Main(string[] args)
{
#region Array declarations

// A string array containing 10 elements {0, 1, ...,9}.
string[] booksOnCOM;
booksOnCOM = new string[10];

// A 2 item string array, numbered {0, 1}
string[] booksOnPL1 = new string[2];

// 100 item string array, numbered {0, 1, ..., 99}
string[] booksOnDotNet = new string[100];

// The size of this array will automatically be set to 4.
// Note the lack of the 'new' keyword.
int[] ages = {20, 22, 23, 0};

// Need 'new' keyword when you define a fixed size array.
// Uncomment to trigger error.
// int[4] ages = {30, 54, 4, 10}; // Error!
#endregion

Console.WriteLine("***** Array as Parameter *****");
PrintArray(ages);

Console.WriteLine("\n***** Array as return value *****");
string[] strs = GetStringArray();
foreach(string s in strs)
Console.WriteLine(s);

Console.WriteLine("\n***** A rectangular MD array *****\n");
int[,] myMatrix;
myMatrix = new int[6,6];

// Populate (6 * 6) array.
for(int i = 0; i < j =" 0;">

// Show (6 * 6) array.
for(int i = 0; i < j =" 0;">

Console.WriteLine("\n***** A jagged MD array *****\n");
int[][] myJagArray = new int[5][];

// Create the jagged array.
for (int i = 0; i < i =" 0;" j =" 0;">

// Initialize items at startup or...
Console.WriteLine("\n***** Created array of strings *****");
string[] firstNames =
new string[5]{"Steve", "Gina", "Swallow", "Baldy", "Gunner"};

// ...go member by member.
/*
string[] firstNames = new string[4];
firstNames[0] = "Steve";
firstNames[1] = "Gina";
firstNames[2] = "Swallow";
firstNames[3] = "Baldy";
firstNames[4] = "Gunner";
*/

// Print out names in declared order.
for(int i = 0; i <>

// ... and print them.
Console.WriteLine("\n\n***** Here is the array once reversed *****");
for(int i = 0; i <>

// Clear out all but the final member.
Console.WriteLine("***** Cleared out all but young Gunner *****");
Array.Clear(firstNames, 1, 4);
for(int i = 0; i <>

Posted by MALIK 0 comments

Labels: c#

C Sharp

STRING

using System;
using System.Text;

namespace Strings
{
class StringApp
{
public static int Main(string[] args)
{
Console.WriteLine("***** Fun with Text *****\n");
System.String strObj = "This is a TEST";
string s = "This is another TEST";

// Test for equality between the stings.
if(s == strObj)
Console.WriteLine("Same info...");
else
Console.WriteLine("Not the same info...");

// Concatenation.
string newString = s + strObj;
Console.WriteLine("s + strObj = " + newString + "\n");

// Escape characters.
string anotherString;
anotherString = "Every programming book needs \"Hello World\"";
Console.WriteLine("\t" + anotherString);

anotherString = "c:\\CSharpProjects\\Strings\\string.cs";
Console.WriteLine("\t" + anotherString + "\n");

// The @ string turns off the processing of escape characters.
string finalString = @"\n\tString file: 'C:\CSharpProjects\Strings\string.cs'";
Console.WriteLine(finalString);

// Spacing is preserved!
string myLongString = @"Stuff Stuff Stuff Stuff Stuff
Stuff Stuff Stuff Stuff Stuff Stuff Stuff
Stuff Stuff Stuff Stuff Stuff ";
Console.WriteLine(myLongString);

// Make changes to this string? Not really...
System.String strFixed = "This is how I began life";
Console.WriteLine(strFixed);
string upperVersion = strFixed.ToUpper();
Console.WriteLine(strFixed);
Console.WriteLine(upperVersion + "\n\n");

// Play with the StringBuilder class.
StringBuilder myBuffer = new StringBuilder("I am a buffer");
myBuffer.Append(" that just got longer...");
Console.WriteLine(myBuffer);
myBuffer.Append("and even longer.");
Console.WriteLine(myBuffer);
string theReallyFinalString = myBuffer.ToString().ToUpper();
Console.WriteLine(theReallyFinalString);

// Note! System.String also defines a custom indexer to access each
// character in the string.
for(int k = 0; k <>

return 0;
}
}
}

Posted by MALIK 0 comments

Labels: c#

C Sharp

Hello Message

using System;
using System.Windows.Forms;

class HelloMessage
{
public void Speak()
{
MessageBox.Show("Hello...");
}
}

TEST APPLICATON

// The first C# app of the book...
using System;

// Add this!
// using System.Windows.Forms;

class TestApp
{
public static void Main()
{
Console.WriteLine("Testing! 1, 2, 3");

// Add this!
// MessageBox.Show("Hello...");

HelloMessage h = new HelloMessage();
h.Speak();

// Oops! Forgot semi-colon.
// Uncomment line below and
// use /bugreport to build
// report file.
// h.Speak()
}
}

Posted by MALIK 0 comments

Labels: c#

LINUX

INSTALLATION LINUX

Red Hat is a popular Linux distributions (at least in Indonesia). With the convenience features that make Red Hat is replace the windows. On the other hand, many computer users are reluctant to leave the windows of one hundred percent. Clever solutions to this case is to use two operating systems simultaneously, the windows and linux. However, things are not easy (at least the author of several natural time ago) to install Linux in addition to the windows that have been placed with the sweetness in space
hard drives. Problems most occur in the general division of the partition. Although many software-divider partition, say the Partition Magic-the popular, but the author felt it necessary to write this tutorial, as a guide for which you want to switch to Linux.
RedHat 9.0 released on 31 March 2003, the information and complete Documentasi RedHat Linux can be obtained from the official site RedHat, http://www.redhat.com One thing I can leave in, that all screnshot in the tutorial is taken from the author Documentasi official Red Hat (http://www.redhat.com/docs/manuals/linux/). Preparing Installation Some things you should note before starting the installation is:
  • 1. Divider partition software, like Partition Magic, this software you can buy or download on the Internet site. Please look at www.download.com
  • 2. Or change the size of your windows partition with softaware pambagi the partition as partition magic. So that there is one empty partition to get this installation space of 1.8 GB. In general, if you buy a new computer, then there is only one partition on the hard disk, the C: With this condition, does not allow you to install Linux. So resizing the partition C: in the windows with software divider partitions exist.
  • 3. Find out keyboard configuration. Use the keyboard layout you like on the windows. To find out click Start -> Settings -> Control Panel -> Keyboard. Select Properties on the keyboard language tab. Please note keyboardnya layout.

  • 4. Know Mouse configuration; PS / 2, serial or USB, PS / 2 or USB, to see to know mouse with the CPU (port)

  • 5. Large space that has not been used in hard drives. This is useful for a partition plan that will be created.
To see the use chkdsk command in dos prompt.
  • 6. The type and configuration monitor and video card that you have, the amount of memory your video card, titleyour monitor (title = brand):) And the one thing that you should know is the term vertical and horizontal range of your monitor.
  • 7. Also not less important, before the start, back up your important data first, is to maintainpossible loss of data when the division of the partition.
  • 8. Last prepare cemilan, coffee and magazines. This is very useful once while awaiting installation components that take an hour or more.

Posted by MALIK 2 comments

Labels: linux

Newer Posts Older Posts Home

Links

  • ALJAZEERA TV
  • ANTARA
  • Bali`s Blogger
  • BBC
  • BERITANET.COM
  • CHIP ONLINE
  • CNN
  • DETIK.COM
  • E-BOOK
  • Economic
  • Friends
  • Friendster's Blog
  • Habibieafsyah
  • HARVARD UNIVERSITY
  • ILMU KOMPUTER
  • INFO LINUX
  • KICK ANDY
  • LINUX OpenSuse
  • LINUX SLAX
  • Linux Temanggung
  • LINUX UBUNTU
  • LIPUTAN 6 SCTV
  • MASTER BLOGGER
  • METROTV NEWS
  • MUSIC DOWNLOAD
  • My Class
  • Robotic AMIKOM
  • SMA N 3 TEMANGGUNG
  • SMART E-LEARNING
  • SOFTPEDIA
  • STMIK AMIKOM
  • SUPPORTED BLOGGER
  • TIPS TRICKS
  • TRIAL FILM
  • TV ONE ONLINE

Blog Archive

  • ► 2009 (38)
    • ► 05/31 - 06/07 (1)
    • ► 02/15 - 02/22 (1)
    • ► 01/11 - 01/18 (11)
    • ► 01/04 - 01/11 (25)
  • ▼ 2008 (70)
    • ► 11/30 - 12/07 (22)
    • ► 11/16 - 11/23 (18)
    • ► 11/09 - 11/16 (1)
    • ► 10/26 - 11/02 (5)
    • ► 10/19 - 10/26 (16)
    • ▼ 10/12 - 10/19 (4)
      • C Sharp
      • C Sharp
      • C Sharp
      • LINUX
    • ► 10/05 - 10/12 (4)



$100.00 Anda pasti untung setelah registrasi!






Search Engine Optimization and SEO Tools







Bookmark CO.CC:Free Domain