Tuesday, 25 November 2014

What's New in C# 6.0


Here is a welcome post for the C# 6.0. I am hereby sharing altogether what are all I have read. And I have given some easily understandable sample code snippets. 

Lets look at the new features of C# 6.0. 


Primary Constructors:

Primary Constructor feature allows you to mention the arguments of the constructor while creating the class itself. Please find the code below:

Class Employee(string name, int id)
{
private string _name = name;
private int _id = id;
}

And if you have more than one constructor, then you can define them as usual, but only one is primary and the one declared along with class creation is the primary constructor.

for ex: 
Class Employee(string name, int id)
{
private string _name = name;
private int _id = id;
public Employee(string name, int id, string platform)
{
//your code
}
}

In this, still the constructor with 2 parameters is the primary constructor. 

Auto Properties:

You have a new way of defining your default value to your property. In the below code, for the class Employee, we have the properties name and id, to which we are setting default values.

Class Employee
{
Public string name { get; set; } = “Karuppasamy”;
Public int id {get; set; } = 1552;
}
Class Syncfusion
{
Employees.Add (new Employee(){ name, id}); à The default value will be set to the property
}

Using Statement for Static members:

No more need to use the class name repeatedly as prefix while calling the static member of a class. You can declare the class in the using as below,

Using MyNameSpace.MyClass;
Class Employee(string name, int id)
{
Private string _name = name;
Private int _id = id;
WriteProperties(_name, _id); à consider MyClass contains the static method WriteProperties.
}

Declaration Expression:

No more need to declare the out variable before it is been used.
Lets have this method:

CalculateExperience(int YearofJoin, out int experience)
{
experience = DateTime.Now.year – YearofJoin;
}

Current expression to call this method as follows:
we need to declare the out variable before pass it to method

int experience;
CalculateAge(2012, out experience);

We can call this method in C# 6.0 as follows

CalculateAge(2012, out var experience);

Using Await in a catch/finally block.

The compiler will allow you to use await inside the catch block and obviously in finally block too.
Ex: if you are about to download from URL and if it is broken, you can give another URL in the catch block. Find the code below:

WebClient wc = new WebClient();
String result;
Try
{
result = await wc.DownloadStringTaskAsync(new Uri (http://brokenUri));
}
Catch
{
result = await wc.DownloadStringTaskAsync(new Uri (http://SpareUri));
}

 Null Propagation:

You would have done the following code to add the Null Check.

Console.Write(Employee == null ? “No Employee” : Employee.Id);

But in C# 6.0, the above code has been shortened as


Console.Write(Employee.Id ?? “No Employee”);

Kindly leave your valuable comments and feedback. 
Thanks,

Tuesday, 14 January 2014

Delegate in C#

Delegate is always been a weird word for the C# starters. But actually it is same as function pointers in C++.

Here I am giving one line definition and a very small easy understandable sample here.

Delegate is a reference type variable which holds the reference for a method. The reference can be changed at run time.

Syntax:
delegate <return-type> <delegate-name>;



Ex program:
 // defining Delegate
public delegate int Calculation(int x);

Public Class Test
{
int n=10; m=10;
Public int AddNum(int a)
{
int n +=a;
return n;
}
Public int MulNum(int b)
{
Int m= m*n;
Return m;
}
Public string void args[]
{
//creating instance for delegate
Calculation acalc = new Calculation(AddNum);
Calculation bcalc = new Calculation(MulNum);

//passing values to the delegate

Console.WriteLine(The Added Value is {0}",acalc(25));
Console.WriteLine(The MultipliedValue is {0}",bcalc(10));
}
}

The result will be: 35 and 100.

Yes its the way it is working. Just do an example program and get the way out....

Thursday, 11 April 2013

Phone Interviews: How To Put Your Best Voice Forward


Today, more and more employers are conducting phone interviews before inviting job candidates to an in-person meeting. With more applicants available for each opening, employers do not have the time to invest in a meeting for every candidate that simply looks good on paper. Phone interviews make it easier to screen a candidates.
Some of these phone interviews may include standard questions that ask about facts, such as your experience and any specific skills you have. However, there are also employers who dive right into some of the most challenging questions, such as giving you a scenario and asking for your response and plan to handle the situation described.
As a job applicant, there are benefits and disadvantages to a phone interview. Some people are well-spoken and are great on the phone, but in person, their nervousness gets to them. Some are more comfortable speaking in-person and lack personality on the phone. Under both situations, it can be a challenge when you don’t have feedback that may typically appear through face-to-face contact.
Regardless of the situation, you need to put your best voice forward to leave the employer with a good impression. This may be the only shot you have at getting a step closer to securing a job offer with them. Remember that the employer may change their mind about inviting you in for an interview if you fall short of their expectations or leave a negative impression on the phone.
Note that in a phone interview, your intonation is most important in how you come across, so you should be energetic and enthusiastic and change your tone to better engage the interviewer. You should also be prepared to ask some basic questions, although save the big ones for a formal interview.

Putting Your Best Voice Forward In Phone Interviews

Take the tips offered here to help put your best voice forward and further advance on an opportunity to a job offer:

Treat Every Call You Receive Like It Was An Interview

Phone interviews may not always be scheduled. An employer may call you to respond to your submitted cover letter and resume, and the moment you pick up the phone an interview may occur right then. Most employers will be courteous to first ask you if this is a good time, but that does not always happen.
So, if you believe there is a chance an employer may be calling, be prepared by providing a professional greeting on your voicemail or when you pick up. Also be conscious of what the caller may hear in the background if you pick up the phone. If it’s not an appropriate time or place to talk, let it go to voicemail, but try to call back immediately when it is more appropriate for you to talk.

Talk Enthusiastically

Since the interviewer will not see your face, all they have to work off of is the voice you present, so make sure it sounds enthusiastic and energized with confidence. Try keeping a smile on your face as you talk and be aware of your tone and pitch so you do not come off sounding monotone.

Watch Your Words

Keep a “can do” attitude when you talk. It will leave a more positive impression than if an employer were to hear, “I can’t,” “I don’t,” or “I haven’t.” Also be conscious of how you speak, to avoid the “Ahs,” “Errs” and “Ums.” You can come across as unsure of yourself and lacking in confidence.

Use A Clear Line

Many people list their cell phone number on job applications, cover letters and resumes, which is fine, as long as when the phone is answered you are under good reception. If you are the one initiating the phone call, use a landline to avoid static or dropped calls. It’s also important to find a quiet location where you will not be disturbed or distracted.

Treat It Like An In-Person Interview

Keep in mind points that you can use to help explain how your previous experiences or skills make you a good fit for the open position. Also, always have questions in mind to ask during the interview that show your interest and desire to work with the company. Don’t forget to also keep your resume, a sheet of paper and pen on hand. You’ll need these items for reference or to take notes while on the call.

Find Out The Next Steps

Interviews, whether in-person or over the phone, should end with an understanding of what the next steps are. If it was not covered, be sure to ask. The employer may also view this question in a positive way that you care about this opportunity and have a desire for it.
Remember, phone interviews deserve a follow up thank you note or e-mail to the individual(s) you spoke with – just as you would do after an in-person interview.
Treat phone interviews as important as a face-to-face interview. The impression you make on the phone will also be taken in to consideration when the employer is trying to decide between you and another candidate for the position.


Thanks to Mr.Don Goodman, president of Resume Writing Service - About Jobs,
for this article..

How to crack Adobe Photoshop CS6

                                   How to crack Adobe Photoshop CS6

Hi guys, here I am going to give you the tricks that, how to crack the Adobe Photoshop CS6.

All you need is just download the Trial Version

Install it and go to the installed folder (for ex: C:\Adobe\Adobe Photoshop CS6\) and replace the amtlib.dll with this amtlib.dll (click to download) file.

Excellent now you have cracked the Adobe photoshop CS6.



Please leave your comments....

Saturday, 6 April 2013

IBM hiring freshers...

International Business Machines Corporation, or IBM, is an American multinational technology and consulting corporation, with headquarters in Armonk, New York, United States. IBM manufactures and markets computer hardware and software, and offers infrastructure, hosting and consulting services in areas ranging from mainframe computers to nanotechnology

Company Name: IBM India














Website Detail: www.ibm.com

Job Role: Entry level Engineer

Qualification Required: B.E/B.Tech, M.E, M.Tech, M.C.A


Experience Required: Freshers

Batch Allowed: 2011 & 2012

Job Location: Bangalore, Chennai, Gurgaon, Hyderabad, Kolkata

Salary Offered: Best in Industry

Candidate Profile:
  • Candidate should be B.E/B.Tech, M.E, M.Tech, M.C.A
  • Graduates & Post graduates from all technical streams are eligible.
  • Candidate from all technical streams are eligible except pharma and fashion technology
  • Candidate from 2011 and 2012 can apply
Candidate should have:
  • 70% for universities outside Maharashtra
  • 65% for inside Maharashtra 
  • Pre University : 65%
  • SSLC : 65%




Friday, 5 April 2013

மாநகரப் பேருந்து....



நான் சென்னை முகப்பேர் பகுதியில் வசிக்கிறேன் . தினமும் மாநகரப் பேருந்தில் பயணிக்க வேண்டி இருக்கும். ஒரு நாள் மாநகர பேருந்து வழிதடம் 147B பயணம் செய்யும் பொழுது. கலெக்டர் நகர் பகுதியில் உள்ள போக்குவரத்து சமிக்ஞை, சிவப்பு விளக்கு காட்ட, அங்கு ஒரு சில இரு சக்கர வாகனங்கள் அதை மதித்து நின்று கொண்டிருந்தார்கள். ஒரு போக்குவரத்து காவல் அதிகாரி அதை ஒழுங்கு செய்து கொண்டும், மதியாமல்  போவோரை கண்டித்து கொண்டும் இருந்தார். 

ஆனால் நான் சென்ற மாநகர பேருந்தோ அதை ஒரு சட்டும் செய்யாமல் சென்றது, நான் வெளியில் ஒரு முறை பார்த்து, பச்சை விளக்கு எரிகிறதா என உறுதி செய்ய முற்ப்பட்டேன்.
ஆனால் இல்லை, எனக்கே இது சற்று மன வருத்தம் தரும் நிலையில் இருக்கும் போது, அந்த போக்குவரத்து காவல் அதிகாரிக்கு எப்படி இருக்கும்?

அவர் தலையில் அடித்து கொண்டார். மாநகரில் ஓடும் மற்ற வாகன ஓட்டுனர்களுக்கு முன்னுதாரணமாக இருக்க வேண்டிய இந்த மாநகர பேருந்து ஓட்டுனர் இவ்வாறு நடந்தது மிகவும் தவறு,

இது போன்ற விதி மீறல்களை கண்டால், நீங்கள் புகார் தர வேண்டிய எண்: 9884301013,9445030516, 9383337639.

(குறிப்பு :எனக்கு அப்போது இந்த எண் கிடைக்கவில்லை, இப்போது அந்த ஓட்டுனர் யார் என்றோ, நான் எந்த த்தியில் பயணம் செய்தேன் என்றோ ஏதும் ஞாபகம் இல்லை).


 Metro Bus


                      I am living in Mugappair in Chennai. I usually use Metro buses.
Once when I was traveling in the  Metro Bus RouteNo: 147B, the traffic signal shown its way of stopping us(Red signal). Some two wheelers were stand by giving respect to it, (may be its a fear of that Traffic Police). Yes that Traffic police disciplined the Traffic. The bus in which I am going, cross the signal without any hesitation at all. I was stunned and looked outside to conform for the Green Signal. But unfortunately it is not.

The Traffic Police felt ashamed of the MTC buses that doesn't follow traffic rules.

The MTC bus drivers should be the precursor of the drivers of other vehicles.

If you see/experience/come to know these kind of Traffic violations by any MTC driver/conductor, the complaint number as follows:
9884301013,9445030516, 9383337639.