Thursday, December 28, 2017

C# 6.0 features:
1. using static System.Console;
Example:
 using static System.Console;
 class Program
    {
        static void Main(string[] args)
        {
            WriteLine("Hello World!");
        }
    }


2. String interpolation.
Example:
WriteLine($"{firstName} {lastName} is my name!");

3. Null conditional operators.

4. Getter only auto properties.

5. Auto property initializers in C#

6. Parameterless constructor for structs

7. Dictionary Initialisation

8. await in catch and finally

9. Exception Filters
Example:
C#5.0:
catch (Exception ex)
{
if (ex.Message.Equals("500"))
Write("Bad Request");
}
C# 6.0
catch (Exception ex) when (ex.Message.Equals("400"))
{
Write("Bad Request");
ReadLine();
}

C# 7.0 features:
1. Local function / nested function
2. We can use out variable on the fly,
Example:
static void Main(string[] args) {
        string s = "26-Nov-2016";
        if (DateTime.TryParse(s, out DateTime date))
{
            WriteLine(date);
        }
        WriteLine(date);
    }
3. Tuples
4. Expression bodied methods / Constructors / getssers / setters
5. Throw expressions

Invoke Vs BeginInvoke:
Delegate.Invoke: Executes synchronously, on the same thread.
Delegate.BeginInvoke: Executes asynchronously, on a threadpool thread.
Control.Invoke: Executes on the UI thread, but calling thread waits for completion before continuing.
Control.BeginInvoke: Executes on the UI thread, and calling thread doesn't wait for completion.

Dependency Injection:
1.
Interface ILogger
{
OpenLog();
Log();
CloseLog();
}

2.
Class FileLogger() : ILogger
{
public string LogFileName { get; private set; }

public FileLogger(string logFileName)
{
LogFileName = logFileName;
}

public void OpenLog()
{
//
}

public void Log()
{
//
}

public void CloseLog()
{
//
}
}

3.
Class LoggerEngine()
{
ILogger _logger;

public LoggerEngine(ILogger logger)
{
_logger = logger;
}

public void log(string message)
{
_logger.OpenLog();
_logger.Log(message);
_logger.CloseLog();
}
}

4.
Create Client Class IoCThirdParty
{
public string FileName { get; set; }

public void Write(string message)
{
Logger ip = new Logger(FileName);
var obj = new LoggerEngine(ip);
obj.log(message);
}
}

5.
Use Client Class IoCThirdParty
class Use
{
static void main()
{
IoCThirdParty obj = new IoCThirdParty(){FileName="C:\log.txt"};
obj.Write("Hello man!");
}
}

Wednesday, May 17, 2017

Having pimples problem?

Teenagers,

If you feel pimple problems in your face try this,

Take 5/10 grams of "Fenugreek"("வெந்தயம்" in tamil language) and soak it in water before night; Next day morning drink that water and eat the saturated "Fenugreek".

It will reduce the body temporature / clean the stomach and importantly helps to get rid of the pimples. It avoids pimples getting created as well as reduce the already created pimple bump. Try once and you'll definitely feel it.

Wednesday, June 29, 2016

Vacation: going to Goa,india trip

If you go by June month, it's monsoon time.
There are plus and minus in going in this time.
1.First of all its off season, you don't see much crowd.
2.It all be drizzling raining mostly all the day;Chill climate;
3.You will surely miss the waterfalls like doodh nagar, arvalem falls as all of them will be closed due to rainfall.
4.You all miss most of the beach activities and sea food because of rain.
5.Other than that it will be a nice experience to go all the places in bike wearing rain coat, seeing the beauty of trees all around and the giant mandovi river.

Bike rent charges:
Honda Activate - 300/-
Bullet -550/-
And please note take yellow board bike or car. Talking white board vehicle is not correct legally. You would caught by traffic police if they find you are a traveller using white board vehicle. Unnecessarily you would pay fine and waste your time in police station.

Service apartment rent will be like 2500/- rs per day. Its fully furnished have kitchen items, washing machine,fridge.

Wednesday, August 5, 2015

To speed-up computer that running on Windows 7:

1.Open My Computer Properties

2.Open Advanced System Settings

 3.Click Performance - Settings


4.Select Adjust for best performance - Click Apply then Ok


 5.You could see that the system "theme" is changed to basic one; Don't worry you can continue do your usual task with this theme.


Lets see one more settings, be careful on doing this.

a.Open Task Manager

b.Click Show Processes from all users

c.Click Memory(Private.... to sort the column. Identify which task taking huge memory; Be careful in choosing unwanted memory consuming task and Stop / Kill as shown below. If you choose wrong one unknowingly no wonder your precious work may get spoiled.

d.1.If you don't want the huge memory consuming process just End Process

 d.2.Or Click Go to service and Click Stop service

d.3.Stop the service




Actually speaking the above methods reduce the overheads for Operating System. So, it seems the Computer is running fast.

The permanent solution would be buying a new Computer with good configuration!!

Monday, July 1, 2013

Windows 7 Search Settings

Window7 search in more easy way. 

Search can be done with AND / OR / NOT operators. For example,

Search in any folder with keywords(keyword1, keyword2). U will be getting more exact results,
            keyword1 OR keyword2            
            keyword1 NOT keyword2
            keyword1 AND keyword2
Just try it; It will save your time.


Search with the following word in search box will result all the files in the folder except folders itself.
*.* AND Type:NOT Folder

For more info.,
http://windows.microsoft.com/en-us/windows7/advanced-tips-for-searching-in-windows

Thursday, June 20, 2013

Softwares For Free Download
Hi,
      Here are some system utilities of Microsoft for free,
      http://technet.microsoft.com/en-us/sysinternals/

How to type in tamil in Notepad, Microsoft Word or any text editor?

Now we can type in tamil in any text editor...Its easy with this google input tools.

Refer the following screen shots.
1. Typing In Notepad

2. Typing in Microsoft Word


Download the tool from the below path.
http://www.google.co.in/inputtools/windows/