10 Best Coding Bootcamps

Dev Bootcamp

Image via flickr

The technology industry is has become the lead earner in almost every market.  Every new product or technological advance in the past few years seems to be based in computer science. This has caused increased in computer science majors and other professionals transitioning into tech careers. One of the best ways to hone your programming skills is attending a coding bootcamp. This article will give you the information you need to find the best coding bootcamps for you.

What Is a Coding Bootcamp?

Coding Bootcamp

Image via flickr

In order to meet the high demand for skills-building training for the tech industry. Many companies have developed immersive training programs (code bootcamps) that help individuals from all backgrounds gain the skills they need to start or help their tech career. Though they might have different training formats or coursework, the best coding bootcamps’ main focus is to develop better software engineers and place them in fulfilling careers in the tech industry.

How to Prepare and What You Can Expect to Learn

Dev Bootcamp

Image via flickr

The best coding bootcamps are rigorous training courses that fully immerse you in coding for 10 plus hours a day. These camps can last several weeks or months depending on your choices. To get the most out of the camp, students should prepare themselves for the experience. Below are some quick ways to prepare so that you are not overwhelmed.

Define Your Goals 

Brush Up on Coding

Prepare Mentally 

Research the Best Coding Bootcamps 

What Will You Learn?

Coding Language

Image via pexels

The best coding bootcamps are rigorous training courses that fully immerse you in coding for 10 plus hours a day. These camps can last several weeks or months depending on your choices. To get the most out of the camp, students should prepare themselves for the experience. Below are some quick ways to prepare so that you are not overwhelmed.

Fundamentals of Programming  

Troubleshooting and Resolve Bugs 

Comfortable with Failure 

Teamwork 

10 Best Coding Bootcamps

1. Le Wagon

  • Location
  • Courses
  • Review

Le Wagon is an intensive, international bootcamp geared towards entrepreneurs. It is product-driven program that teaches Ruby, JavaScript, HTML & CSS, Github (among other things). Participants will master coding skills over a 450-hour, 9-week program.
After completion of coursework individuals will be able to find work in the tech industry, develop their own applications, and join an extensive alumni network.

2. App Academy

  • Location
  • Courses
  • Review

App Academy a full-time web development class that encompasses 12 weeks. Campers will learn the skills needed to build modern Ruby on Rails and JavaScript web applications. It also has a deferred tuition plan that allows participants to pay for the program only after they land a web development job. Of their 2,000 students, 98% of the graduates have been placed in high paying software development roles.

3. Ironhack

  • Location
  • Courses
  • Review

Ironhack is a global tech school that offers courses in web development and UX/UI design. They have camps that are part-time and full-time in 24 or 9-week formats (respectively) that are taught in person. Ironhack also provides career services such as resume building, job interview prep, and career fairs. Including facilitating job interviews in your local city’s tech industry.

4. General Assembly

  • Location
  • Courses
  • Review

General Assembly has many locations, as well as online courses in order to provide a range of full time, part-time, and self-paced options for its students. Established in early 2011, the camp also provides career coaches and various networking opportunities to help students find employment. They offer scholarships to under-represented groups in tech including: women, veterans, and low-income.

5. Bloc

  • Location
  • Courses
  • Review

Bloc has three options for courses; 12, 18, and 36 weeks. It focuses on students building actual applications. It was the world’s original online coding bootcamp with 1 on 1 mentorship. They provide a self-paced online bootcamp that utilizes weekly one-on-one meetings with a mentor. Bloc will also reimburse your tuition if you do not find employment within six months of completion.

6. Thinkful

  • Location
  • Courses
  • Review

Thinkful allows part-time and full-time engineering immersion bootcamps that last 5 to 6months. While enrolled, students will receive one-to-one mentoring, 40-plus hours of Q&A sessions, and flexible class scheduling. This program also offers tuition deferment and a job guarantee for certain programs.

7. Flatiron School

  • Location
  • Courses
  • Review

The immersive courses are 12 weeks for full-time courses in web and mobile development. The Flatiron School also offers a 15-week part-time option for individuals looking to change careers by giving them test driven labs and portfolio building projects. Included in the program is an access to comprehensive career services that has led to a 97% job placement rate.

8. HackerYou

  • Location
  • Courses
  • Review

Located in downtown Toronto, HackerYou has a full-time 9-week bootcamp in web development. Unlike other programs, they offer 10 to 1 student-instructor ratio. That combination of hands-on, project-based learning from industry leading professionals is why HackerYou is one of the best coding bootcamps. This also includes unlimited access to the twelve thousand square foot, brick and mortar learning facility.

9. The Tech Academy

  • Location
  • Courses
  • Review

The Tech Academy is one of the best coding bootcamps with the most flexible format. The program is not only self-paced, it also offers open-enrollment for both part-time and full-time campers. Students are allowed to mix both online or in-person classes to complete their coursework. It aims to prepare graduates for roles as junior developers and is willing to assist them in their job search.

10. Hack Reactor

  • Location
  • Courses
  • Review

This company is not limited to just part-time and full-time immersive programs. Hack Reactor also provides live, online remote bootcamp for students to attend anywhere in the world. Their immersive program totals 12 weeks, with the first 6 teaching students the fundamentals of development.

Conclusion

These bootcamps are giving individuals some of the most relevant skills of the 21st century in a highly competitive job market. To ensure your skills are up to the highest tech industry standards, you need to attend one of the best coding bootcamps you can. Hopefully this list of ten shows you how many options that potential software developers have. The best coding bootcamps should meet all your goals for career development, knowledge building, and job placement.

How to Search & Replace Strings with C#

If you’re wondering how to search and replace string with C#, then you’re at the right place. Our aim with this tutorial is to give you all the information that you need on how to do this, but we’ve also tried to make it simple and get to the point immediately so that it’s simple to understand and it cuts through the fluff.

In C#, there’s a really easy method to find an old value in a string and replace it (and all instances of it) with a new value of your choice. This method aptly named the Replace method, is fairly straightforward to understand. The syntax is as follows:

public string Replace(
    string oldValue,
    string newValue
)

The best way to understand how to use a method, though, is to see it in action. So let’s say that we have the following string:

String a = "My favorite foods are ice cream and pizza";

But maybe you actually hate pizza, and want to change the word “pizza” to “burgers.” Here’s how you would go about doing it:

a = a.Replace("pizza", "burgers");
Console.WriteLine(a);

So the output of the code above would be: “My favorite foods are ice cream and burgers” written to the console.

When using this code, it’s important to remember that what you want to be replaced will be replaced in ALL instances. So if you had pizza written twice in the string above, then it would have been replaced twice by the word burgers, like this:

String a = "Ice cream is my favorite food. I don't like pizza as much as I like ice cream, but I like pizza more than I like hot dogs";

a = a.Replace("pizza", "burgers");
Console.WriteLine(a);

The output of the code above would be: “Ice cream is my favorite food. I don’t like burgers as much as I like ice cream, but I like burgers more than I like hot dogs.”

Finally, there is also a way to use the Replace method to replace something multiple times. So if you want to replace pizza with burgers for the string in the example above, but then decide you want to replace burgers with cookies immediately after. The code to execute that effect would look something like this (assume that a in the example below is the same string as a in the previous example):

a = a.Replace("pizza", "burgers").Replace("burgers", "cookies");
Console.WriteLine(a);

Your final output of the code above would be “Ice cream is my favorite food. I don’t like cookies as much as I like ice cream, but I like cookies more than I like pizza.”

(Apologies if this tutorial has made you hungry.)

The search and replace method is one that is fairly easy to use. Play around with it and see what kind of strings you can create (maybe ones that aren’t all about food), and how many times you can change the same string so that by the end it doesn’t resemble the original string at all.

We hope that this tutorial has provided you concise yet detailed information about how to search and replace string with C#. I’m sure that it has helped you to understand some things that you might have seemed somewhat complex to grasp.

We’d love to know what you think of this tutorial. Has it helped you? Has it given you all the information that you were looking for? Let us know what you think or hit us up with any questions that you might still have after reading this tutorial.

What Coding Language Should I Learn? How To Pick One That’s Useful For Your Career Aspirations

image source: pexels

We all remember the time we got that first taste of coding. We learned to type a few simple commands, or perhaps press a few buttons, and bam, like magic, the computer or device did exactly what we told it to do. So now, you're thinking it would be a good idea to code for a living. Congratulations! It's a great career path. But now that you know what you want to do, you're probably wondering, "What coding language should I learn?"

What Coding Language Should I Learn?

woman using her laptop

image source: pexels

Keep in mind that there is no one "right" answer to this question. The best and the brightest keyboard jockeys of Silicon Valley have been duking it out over their CPU's ever since BASIC. And yet, "what coding language should I learn" can often perplex both newbies and Microsoft veterans alike. In 2019, the hot programming languages in demand by most employers and startups appear to be Python, Java, JavaScript, PHP, Ruby, and C++ or C#.

But before we begin to look at the various languages that you can code in, there is one fundamental question that should drive your quest to learn a coding language. So rather than put the cart before the horse, let's focus on the purpose of your desire to code. It's better to first consider the purpose of your passion for coding, rather than the features of each code which you may or may not end up using depending upon your potential role.

What Will You Use It For?


Like any technology, your first question to ask when looking for a language to code in should probably be, "Why do I want to code?" Or "What do I want to use it for?" This will make the question of "What coding language should I learn" infinitely easier.

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”
― Martin Fowler

Sometimes, new technologies dazzle and intrigue us, which is a good thing. However, the downside of the wonder of technology is that sometimes it can get so sparkly and fun that we occasionally lose sight of the purpose we intended it for. So before we ask "what coding language should I learn," let's ask why we're learning it in the first place or what our employer will want us to do with it. This will better determine where we ought to spend the bulk of our efforts and resources when venturing out to learn a new programming language.

Different Programming Languages For Different Purposes

laptop in the table

image source: pexels

Now that we've told you the major players in the coding language game, let's figure out the answer to the question, "What coding language should I learn?"

Python


The title of the language might be menacing and perhaps that was intentional by the designers of Python, but only because it's such a formidable force in the vast sea of programming languages that can help you answer the question, "What coding language should I learn." We're going to take some out of the sting out of Python here, so stay with us.

First off, colleges and universities now choose Python over their old number one programming pick, which was Java. Java remains a potent force in academia, but there's a reason Python has bested them. All those academics can't be wrong, right? In any event, Python should definitely be on your radar screen when answering the question of "What coding language should I learn."

Python is relatively easy for a beginner to pick up as compared with some of the old-school coding languages. Python makes programming easy for the creative who lack a lot of time by automating the mundane repetitive tasks nobody else wants to have to repeat over and over again.

Machine learning being the rage that it is today, perhaps herein lies one of the most potent arguments for why Python is the answer to "What coding language should I learn right now?" For science and machine learning, no coding language is hotter than Python. This means you'll have all the tools you need to make your venture a cinch. This is because of the abundance of machine learning libraries already built for this formidable snake of a coding language that has taken the rest of the field by storm.

Java And JavaScript


Java and Javascript are related but distinct coding languages. Java is primarily related to standalone applications while JavaScript has more to do with interactive workings on HTML pages. Both are handy to know, but which do you see yourself working on primarily? The answer to this question will help you better answer the question, "What coding language should I learn?" Let's take a look at the difference between Java and its cousin, JavaScript.

Java

Java, a class-based, object-oriented programming language, made a big splash when it came on the scene in 1995. The whole purpose of Java was "write once, run anywhere." In other words, it was intended by creator James Gosling to be universally compatible on any machine. That means you can write something in Java and you can run it on your Mac, your PC, your phone, your Linux system, and the like. You can see why this language remains so popular after all these years.

Java is a good choice if you want to program standalone applications that can run anywhere, any time, with minimal adjustment across machines. The downside to Java is that it may not necessarily take full advantage of the special features on any given processor or system, which can lead to slightly slower operating speeds than programs written specifically for languages tailored to a given system or platform

JavaScript

JavaScript has long been the "front-end" programming language, specifically for work within Web pages. The most popular social networks, as well as your favorite Web email program, rely on JavaScript to make all the gears turn when you're checking your inbox or searching your mail for that one email you really need to reference. JavaScript was really responsible for primarily transforming static, "do nothing" Web pages that could only "link" to other pages, and turning the Web into a more truly interactive animal; a legacy it continues to this day.

If you want to spice up your Web pages, or are just looking to incorporate basic elements of interactivity, JavaScript is the way to go. But, keep in mind, Java is the language you'll want to develop in if you're looking to go more the way of a standalone app. Both can work together, however, in impressive ways, so choose which works best for you starting out depending upon your more immediate intended use.

PHP


codes

image source: pexels

If JavaScript is such a great Web-capable language, then why bother considering PHP when asking, "What coding language should I learn?" For starters, PHP puts the magic in modern Web pages. And if you're just starting out, the great thing about PHP is that it's very beginner-friendly. It was designed to take some of the pain out of answering the question, "What coding language should I learn," by incorporating a relatively intuitive design.

One pitfall to avoid is to use an outdated tutorial. There have been quite a few versions of PHP, so you should check the latest industry resources to make sure your tutorials are up-to-date. 

The really cool thing about PHP is its flexibility. Because it's not a rigidly written language, there are no hard, fast requirements on how to code with it. This means that you have a rather total freedom to make your program function how you want it to. No wonder it's one of the top picks of programmers this year! If you like thinking out of the box, you'll be thrilled to know you can use PHP to solve problems in a myriad of different ways. It's really an engineer's dream of a programming language, and its versatility is practically limitless.

Ruby


Among the world's most sought-after programming competencies is Ruby. Like PHP, Ruby is a delight to start learning because of its incredible "beginner-friendliness." Specifically in the way of beginner friendliness, it's intended to be intuitive, reading almost as easily as the English language itself. So talking to Ruby is almost like talking to a good friend.

Ruby's greatest strength, ease of beginning, also does translate into one of its shortcomings compared to the others. This shortcoming is simply that its incredible flexibility makes it very slow. That said, however, it was designed primarily as a language for making games. You can see how this will be useful in the debugging process. Ruby allows you to run the code up until the sticking point in the code, making it easy for you to troubleshoot issues in your code and debug handily.

C# and C++


There's no denying the similarities between C# and C++, since C# is based on the familiarities of the C family of languages, including C++. The purpose of C# is to combine the amazing versatility and familiar nuances of C++ with the high productivity of Visual Basic. We'll consider them both here in answering the question, "What coding language should I learn."

C++

C++ was made primarily for low-level, platform-neutral applications, if you remember our discussion of Java earlier. Still, it was made for standalone systems in an age that predates the Internet's popularity. C++ code, when compiled, generally results in assembly language.

C#

C# is a step toward a language that more resembles Java byte code. It's designed to help developers not have to worry so much about memory management and focus on the zing of their individual program. 

Conclusion

There is no perfect coding language. Indeed, there might not even be a perfect coding language for you, which is why every veteran programmer relies upon a repertoire of code from various programming languages. The experienced programmer draws from these various coding languages as a world traveler relies upon his knowledge of different foreign languages.

That said, there may be a perfect answer to your question in terms of starting your quest for the answer to the question, "What coding language should I learn" first. That answer is the one that best aligns with your goals.

Pluralsight Review: A Technology-Based Learning Platform To Learn C#

Ready to learn how to code? If you've chosen C# as the computer language you want to learn how to code with, then prepare yourself for a steep learning curve. While C#, a Microsoft-based general-purpose computer language, might be the most widely used computer code in the world, it can be tricky learning how to use C# efficiently and functionally.

Compared to some computer languages which are more simplistic, like Python or Java Script, learning the ropes of C# on your own is a recipe for headaches and confusion. That's where e-learning platforms come into play. In this Pluralsight review, we'll tell you about the best internet tutorials - and why e-learning for C# is the smartest decision you'll ever make.

What Is Pluralsight?

E-learning has picked up a lot of speed over the last several years. We can probably give thanks to those endlessly helpful YouTube tutorials for starting this particular trend of using online videos to teach valuable skills. In particular, Pluralsight is a service that takes e-learning via videos to a whole other level.

Man using laptop having coffee

Image by Pixabay via Pexels

According to Pluralsight, the human brain processes videos faster than text - which means that information is absorbed faster through instructive, engaging videos than through explanatory textbooks. Pluralsight has made its mission to provide video training courses for a variety of industries and subjects. C# training courses are just one of many kinds of courses that Pluralsight offers.

Pluralsight has many big-name tech clients, so anything you learn from Pluralsight comes directly from the source company. Pluralsight works with Adobe, Intel, Oracle, Dell, Disney, and Microsoft, which is great if you want to master C# and learn to use this language like a pro.

Product Specs

Pluralsight courses range from coding and software development to IT administration and cybersecurity. When you sign up for Pluralsight, you will immediately notice that the courses are organized from introductory to beginner to intermediate.

Man in white shirt using tablet

Image by Pixabay via Pexels

The e-learning videos are created in partnership with experts and the teachers of each course are available for extra assistance, instruction, or information. Pluralsight prides itself on being convenient and allowing students to learn at their own pace. These personalized features are especially helpful for students who have busy schedules.

Aside from the different course levels, Pluralsight also has post-course assessments to track student progress and let the student know if they are ready for a higher level of learning. Pluralsight even allows students to print off certificates to prove their mastery of course material, something which is especially beneficial to those new to coding or the tech industry. Premium users can even download entire courses for offline use.

Pricing

The best thing about Pluralsight is probably its price and ease of availability. For around $30 a month for subscribers, students have access to thousands of courses.

Pluralsight is a very affordable e-learning tool and even offers free courses for children. Pluralsight offers two additional subscription plans that are a bit pricier but also offer extra features, such as mobile apps, interactive courses, and professional certification practice exams.

Eyeglasses in front of computer

Image by Kevin Ku via Pexels

Although more expensive than the monthly plan, getting a certification through Pluralsight is a fraction of the cost of paying for college courses and then a certification.

How It Compares

We picked a few similar e-learning companies available on the market to see how they compare to our Pluralsight review. We evaluated these companies based on price, ease of use, the training quality, the variety of training, and customer support that is available to students.

  • Codeacademy
  • Coursera
  • Udemy

Pluralsight

Pluralsight

Image via Pluralsight website

Price

Ease of Use

Pluralsight makes everything easy. Once you have an account, Pluralsight will help you pick the right courses for you and has different levels of difficulty for each course to make sure that students aren't overwhelmed by new information.

Training Quality

The training offered by Pluralsight is second to none. Each course is designed and led by experts in the field. The training videos are informative and engaging, which allows students to better absorb complex information. Some training courses are even interactive, giving students a real-time glimpse of how to apply their knowledge. Each course has a post-course assessment so students can track their progress.

Variety

​While primarily an e-learning platform with a focus on the software industry, Pluralsight also works with companies like Disney to offer courses in different subjects, such as animation. Pluralsight offers thousands of different videos and learning courses in software development, coding, IT administration, and cybersecurity. Pluralsight also offers courses in architecture, construction, manufacturing, and creative professional work.

Customer Support

Pluralsight is there for their students. Alongside 24-hour tech support, Pluralsight also supports students through their teachers to make sure that each student is progressing and learning the material well.

Code Academy

Code Academy

Image via Code Academy website

If you're dead-set on learning how to code C# and nothing else, then Code Academy might be a good choice for you. Code Academy has a centralized focus on teaching code - every computer code you can think of can be learned here.

And unlike the features offered in the Pluralsight review, Code Academy takes a more aggressive approach to mastering coding skills by providing quizzes, portfolio-building projects, and real-world projects.

Code Academy puts students right in the center of e-learning courses and expects students to rise to the challenge. Code Academy works directly with tech industry giants such as Facebook, IBM, and Google.

Price

Ease of Use

Code Academy is easy to use, with personalized content and member-only content that customizes e-learning for each student. The pathway for e-learning is tailored to the individual student. Code Academy has a philosophy of personalizing each path to begin coding to the student and allows students to choose coding courses that work best with their goals.

Training Quality

Code Academy positions itself as something between a college course and a boot camp - just more affordable and accessible than both. The quality of the training provided by Code Academy is approachable but demanding, which means a quick acquisition of coding skills for all students.

Variety

If you're only taking online courses to learn how to code, then you won't be bothered that the only courses Code Academy offers are for coding. Code Academy teaches every computer programming language that is used in the real world. However, Code Academy only offers coding classes, so if you are looking for additional courses to learn how to apply code to different areas of the tech industry, then this platform will not be helpful.

Customer Support

Code Academy has 24-hour tech support. But more importantly, Code Academy has community-based support where students can find answers in forums run by other students.

Coursera

Coursera

Image via Coursera website

Do you learn better when information is structured and more similar to a traditional learning environment? If that's the case, then Coursera is a great option for e-learners who prefer a more comprehensive approach to learning new skills.

Coursera is probably the most college-like e-learning platform on this list. This is true for two reasons; first, the structure of the courses is likened to an "interactive textbook," and second, Coursera works directly with top colleges, such as Stanford, Johns Hopkins, Duke, and Penn State.

Price

Ease of Use

The Coursera platform might be a challenge to get used to, but once you understand how the platform works, then navigation of each course is very easy. The "interactive textbooks" take you through lessons, quizzes, videos, and projects that help each student fully master each subject. Through this organization, it's very unlikely that you'll miss an important bit of information that will be helpful later on.

Training Quality

​Coursera works with top colleges for a reason. Each course is curated by experts and organized to give each student a comprehensive education in the subject the course teaches. With Coursera, students attain an education that rivals that of traditional college learning - all for a fraction of the price and with flexibility for busy schedules.

Variety

Like the variety mentioned in the Pluralsight review, the variety of courses offered by Coursera is incredibly extensive. Aside from learning C# and other coding languages, you can also learn IT engineering, financial markets, data science, and health. Additionally, Coursera sets itself apart by offering a full range of professional certifications and full degree programs that can be sponsored through employers.

Customer Support

Given the way Coursera's online platform works, there should be very little reason that customer support is necessary - but on the off chance it is, tech support is usually only a phone call away, although it is not 24-hour support.

Udemy

Udemy

Image via Udemy website

Ready to learn but want a targeted course? Udemy has you covered. At Udemy, you pick what you learn and pay for it by the course. This is a great option for those who have a foundation for what they want to learn and for those who are able to assess their own level of mastery.

Price

Ease of Use

Udemy offers individual e-learning courses that target specific areas of learning. This by-the-course method is easy, but it can be confusing if you select the wrong course for yourself.

Training Quality

Just like in the Pluralsight review, the e-learning training quality of Udemy is curated by experts in the field. You simply select the course you want to learn, pay for that course, and start learning on your own time. However, unlike other e-learning platforms in this Pluralsight review, Udemy does not work directly with companies and colleges.

Variety

​Udemy offers 100,000 online learning courses in a wide variety of topics, including development, design, business, IT, software, marketing, and photography. Any subject or skill you want to learn is probably waiting for you on the Udemy server and is only a click away.

Customer Support

Udemy does a little to help support students. Aside from tech support, Udemy also has personalized recommendations for courses you might be interested in based on the subject of your previous classes.

Pluralsight Review Conclusion

Learning C# is a challenge if you are trying to teach yourself because of how nuanced the computer programming language is. Thankfully, there are many different e-learning platforms that are available to the public to teach you this exact skill and many more.

Most of the e-learning platforms mentioned in this Pluralsight review share many of the same features, such as video training, certificates, and affordability of classes. E-learning platforms are also easy to work with busier schedules and many offer courses in a wide variety of subjects.

If your goal is to learn and master C#, then you will be satisfied with the online training offered by both Pluralsight and Code Academy. Both of these platforms specialize in software and have expertly curated courses that personalize learning for each student.

However, if you are interested in being able to access a wider variety of subjects, then Coursera and Udemy are probably your best bet for accessing material for other subjects. That said, while all of these e-learning platforms have different course difficulties, if you feel that you need a more structured learning environment, then both Pluralsight and Coursera have the best comprehensive learning platforms.

No matter which e-learning platform you decide is best for you, you can be sure that mastering C# with one of these courses will make your goal much easier to achieve.

Featured image by Kaboompics .com via Pexels.

C# Split String: Tutorial About Joining and Splitting

When developing programs that interoperate with external systems, it’s often necessary to process data in a common format. For example, a program may wish to process data from an Excel spreadsheet. Excel has the capability to export a worksheet in Comma Separated Value (CSV) format. Let’s delve deeper into C# split string.

Using the C# string Split() method allows you to extract the values from in between the commas. Similarly, the string Join()method will take individual values from an array and combine them with a separator, such as a comma. The listing below shows how to use the string Split() and Join() methods:

Listing 1: Joining and Splitting Strings: StringJoinSplit.cs
using System;

namespace csharp_station.howto
{
   class StringJoinSplit
   {
       static void Main(string[] args)
       {
            // comma delimited string
            string commaDelimited = "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec";

           Console.WriteLine("Original Comma Delimited String: \n{0}\n", commaDelimited);

           // separate individual items between commas
            string[] year = commaDelimited.Split(new char[] {','});

           Console.WriteLine("Each individual item: ");

           foreach(string month in year)
           {
                Console.Write("{0} ", month);
           }
           Console.WriteLine("\n");

           // combine array elements with a new separator
            string colonDelimeted = String.Join(":", year);

           Console.WriteLine("New Colon Delimited String: \n{0}\n", colonDelimeted);

           string[] quarter = commaDelimited.Split(new Char[] {','}, 3);

           Console.WriteLine("The First Three Items: ");

           foreach(string month in quarter)
           {
                Console.Write("{0} ", month);
           }
           Console.WriteLine("\n");

           string thirdQuarter = String.Join("/", year, 6, 3);

           Console.WriteLine("The Third Quarter: \n{0}\n", thirdQuarter);
       }
   }
}

And here’s the output:

Original Comma Delimited String:
Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec

Each individual item:
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

New Colon Delimited String:
Jan:Feb:Mar:Apr:May:Jun:Jul:Aug:Sep:Oct:Nov:Dec

The First Three Items:
Jan Feb Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec

The Third Quarter:
Jul/Aug/Sep

In the listing above, there is a CSV string named commaDelimited, which holds the twelve months of the year, separated by commas. It splits this string, joins it into another string, performs a three element split, and finally does a selective join of the 6th through 8th elements of a zero-based array.

The simplest syntax of the Split() method accepts a character array as it’s only parameter, listing the characters to use in determining where splitting of the string should occur. It returns an array of strings, with each element of the array corresponding to the value between the specified delimiter(s). The line below is from the first split operation in the listing:

            string[] year = commaDelimited.Split(new char[] {','});

In a similar manner, elements of an array may be combined into a delimited string by using the Join() method. The simplest overload of the Join() method accepts two parameters: a string, which separates each array element, and the array of elements to be combined. TheJoin() method is static, requiring the String type identifier, rather than a string instance, to implement the command. The following line from the listing creates a string with all year elements in a sequence and separated by colons:

            string colonDelimeted = String.Join(":", year);

Overloads

Those were the simple implementations of these methods and probably the most likely to be used. Now, let’s take a peek at a couple of their overloads to see how to implement more specialized behavior.

The Split() method has an overload with a second parameter, specifying the number of separations to implement. The next line will separate the commaDelimited string into three array elements:

            string[] quarter = commaDelimited.Split(new Char[] {','}, 3);

At first thought, one may think that the three array elements could be Jan, Feb, and Mar, but this is not so. The first array element is Jan, the second is Feb, and the last is the rest of the string. To see for yourself, here’s the output string with each array element separated by a space:

Jan Feb Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec

The Join() method has an overload that allows you to extract a subset of an array. The first two parameters are the same as previously described, and the third and fourth parameters specify the position in the array to begin reading and the number of elements to read, respectively. The following line from the listing creates a string with a forward slash between the sixth through eighth elements of the year array:

            string thirdQuarter = String.Join("/", year, 6, 3);

Final Thoughts About C# Split String and Join 

The string Split() and Join() methods provide the functionality to work with delimited strings. The Split() method allows you to gather a delimited set of values from a string into an array and the C# string Join() method lets you create a delimited string from an array. This supports both custom data formats, as well as information interchange with other programs.

.