This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace sample | |
{ | |
public class Class1 | |
{ | |
private string GetValue(MyEnum em) | |
{ | |
if (Enum.IsDefined(typeof(MyEnum), em)) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace choice | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Enter option 1."); | |
var option1 = Console.ReadLine(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var width = 30; | |
var queue = QueueInit(width); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ProfilingInterfaces; | |
using ServiceInterfaces; | |
namespace ServiceImplementations | |
{ | |
public class CompleateProfilingUserService : IUserService | |
{ | |
private readonly IUserService _service; | |
private readonly ITimeKeeper _timeKeeper; | |
public CompleateProfilingUserService(IUserService service, ITimeKeeper timeKeeper) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Windows.Forms; | |
namespace WindowsFormsApplication1 | |
{ | |
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.IO; | |
using System.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
using ClassLibrary1; | |
using WebApplication1.Services; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Reflection; | |
namespace ConsoleApplication | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void MyOfType<T>(IEnumerable<object> source) | |
{ | |
var x = source.OfType<T>() | |
.Select((value, index) => string.Format("{0}:{1}", index + 1, value)); | |
foreach (var item in x) | |
{ | |
Console.WriteLine(item); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Delegate.History | |
{ | |
public class ValidationByDeletege | |
{ | |
public static Predicate<string> IsNotEmpty() | |
{ | |
return value => value.Trim().Length > 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string[] SplitComma(string s) | |
{ | |
return s.Split(',') | |
.Select(s => s.Trim()) | |
.Where(s => s != string.Empty) | |
.ToArray(); | |
} |