Monday, March 25, 2013

[C#] Split That Newline

Sample text string:


I got a text box that receives multi-liner string. I want to get the data each line so I need to split it. I got some cases regarding this.

[C#] Split the Split!

I've been doing some C# stuff when I came across some quite but not so complicated matter: splitting a just split string. In other words, I want to split a string into an array then split again elements on it giving me a 2-dimensional array.

So here's the solution I found:

String input = "1=2;3=4;5=6";

String myArray1[] = input.Split(';');
String myArray2[][] = input.Split(';').Select(s => s.Split('=')).ToArray();

myArray1 will give {1=2, 3=4, 5=6} which is a 1-dimension array while myArray2 will give {1,2},{3,4},{5,6} which is a 2-dimension array.

Wednesday, March 20, 2013

Resume Making!

Every time i read an article or watch on tv about resumes, managers always give tips on how to make your resume standout like "make your resume unique" or "make it attractive." But what does it take to make your resume standout or how to create a resume that is unique and attractive?

First, what is the importance of resume? Why is it necessary to pass your resume to a company? Basically, because to get an INTERVIEW or you want a CALL BACK. If you got the attention of the HR or Human Resource manager through your resume, then they'll call you for an interview which is the first step for getting employed.

Next, how do you get an interview? There are certain things you need to do or have with your resume like understand/know the position you're applying for, understand/know the company, understand the reader, include the standard information, come up with results, and quantify your results.

[C#] New Line

There are two common ways adding a newline in C#: "\r\n" and "\n". But when we tend to split them, some may be using "\r\n" or just the "\n" so I found this useful variable so that it won't be too confusing and for sure it will be safer.

System.Environment.Newline (or simply type "Environment.Newline" if you already added "using System;" on top)

Related Posts Plugin for WordPress, Blogger...