­
C#

Improved OnPropertyChanged() in .NET 4.5

9:42 PM
Well, we all know (who is programming in WPF) the may be one of the most recently used in WPF,   OnPropertyChanged() method. In general we use this approach to notify data GUI, that data it bind to has been changed. Usually it will look something very similar to following: class MyClass : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; private string title; public...

Read More...

C#

Params in C# - easy to use tutorial

2:59 PM
There is interesting concept in C# - params. Here is the refference in MSDN Lets assume you want do create method that should add numbers and return a result. In our regular way we can build it as following: private int sumAllNumbers(int num2) { int sum = sumAllNumber(1, 2); return sum; } Such approach has some limits and not flexibale enough, because in...

Read More...

C#

Quick and simple way to parse numbers in string

10:36 AM
Some times we have to pull numbers from mixed string. There are several ways to do it, so here i will indroduce some easy and quick one :) string fullSentence ="Just a sentence with numbers from 1 asd f3 234 6to10111" string numbers = Regex.Split(fullSentetnce @"\D+"); foreach(string number in numbers) { if(!string.IsNullOrEmpty(number) { int i =int.Parse(number); Console.WriteLine("{0}",i); } } Result: ...

Read More...

Unity3D

Incredible action of Unity3d !

10:11 AM
Good news for those who interesting in game development ! Unity gives away serial numbers for free for theire product including plugins for android and iOS ! Hurry up, since it will till to 8 March ! ...

Read More...

Android

Andoid DDMS - how to use it in IntelliJ

4:53 PM
When i started to programming in Java (for Android purpose)  in IntelliJ instead of Eclipse, i have found that DDMS tool i was working with in Eclipse is missing in IntelliJ. My searches in web reveal that such tool wasn't implemented in IntelliJ. But solution is simple: because the DDMS tool belongs to Android SDK and not to programming environments, it can be provided by Android SDK itself. So if we...

Read More...

C#

How to show line numbers in Visual Studio (cs and xaml)

10:13 AM
Sometimes we get an error or exception in Visual Studio which points us to some specific line where it has been occured. To make our work more effective, we could use following steps : In VS Tools->Options->Text Editor  In order to see lines in cs files we choose C#   In order to see lines in xaml files we choose XAML In order...

Read More...

C#

Get image relative source in WPF

4:28 PM
Lets assume we get an Image : Image img = new Image() { Width = image.Width, Height = image.Height, Source = image }; then, our solution will look as following : Uri path = new Uri(((BitmapFrame)imageControl.Source).Decoder.ToString()); ...

Read More...

Popular Posts

Total Pageviews