Posts

Facade Design Pattern C#

Image
Facade Pattern Facade Pattern We assume that you have a few things and you get them with one facade. I demonstrated 1 class. But i am sure that you would understand clearly.

Singleton Pattern In C#

Image
Singleton Pattern ,readonly,thread safe,singleton,single instance,c#"> Singleton Pattern It is used to for if we want to send single object to other classes in our class. So what can we do this type situations? Answer is so simple. Singleton class. So us class is not derived for other classes, it must send one instance to others, and other classes reach the element on it. Instance is readonly, static. So we when created it that can one time assigned and we reach to it anywhere in class.And also we used Lazy&ltT&gt. It provides waiting time until instance created. So memory will doesn't busy with this instance until it called. Simple and effective method to memory management. References Lazy&ltT&gt readonly sealed Singleton Class

Type Conversion C#

Image
Type Conversion Type Conversion In C# It showed type conversion in shortly. Actually it has been created for note. I hope so you can find your search in following code sample. References BitConverter Int32.Parse User-defined type casting

Event In C#

Image
C# Event Event Event provides a way to access and see the happens. For this purpose it may works with delegate. I demonstrate how does it work on sample topic. I talked about which keyword what does it work. Call the event. Create and define event References delegate event Invoke()

Action Using With Asynchronous Tasks In C#

Image
Asynchronous , c#, nameof"> Asynchronous Tasks If you have a many process and you have to run asynchron so you can use Asynchronous Tasks . This article contains many feature. You can discover the references topic in the bottom side and i can sure that you will find many funny contents. Have fun with coding. Output : References Action Asynchronous nameof

RGB Color Picker With C#'s WPF

Image
In this article we create WPF app. It uses RGB colors affects. It contains a few features. We can start with Action keyword. This keyword provide display the changes. Normaly we use event handler to keep this type events. As you will see the following code color values increase or decrease 5 by 5. public Action changedRGB; protected virtual void OnValueChanged() => changedRGB?.Invoke(); private void IncreaseValue(object o, EventArgs e) { Button button = (Button)o; switch (button.Name) { case "btnRed": rGB.R += 5; r=rGB.R; lbRed.Content = r.ToString(); break; case "btnGreen": rGB.G += 5; g=rGB.G; lbGreen.Content=g.ToString(); break; case "btnBlue": ...

Show Specific JSON Element On Xamarin App

Image
Get Specific Element In JSON File First we create property class. It easy us project And then we look us real event in this article : Ok we got this but we wonder xaml file. So lets see it