اشتراک‌ها
در C# 11 اگر نام نوعی را با حروف تمام کوچک وارد کنید، اخطار دریافت خواهید کرد

C# 11 is the next version of C# coming in .NET 7, and it is introducing a warning wave that issues a warning when a type is declared with all lower-case letters. This is being done so that in the future the language can begin moving away from conditional keywords and instead use full on keywords instead. The warning is alerting customers to types that may become keywords in future versions. 

در C# 11 اگر نام نوعی را با حروف تمام کوچک وارد کنید، اخطار دریافت خواهید کرد
اشتراک‌ها
انتشار Resharper برای ++C
 JetBrains has released a new version of ReSharper Ultimate, its suite of .NET tools, that now includes the first public version of ReSharper for C++
انتشار Resharper برای ++C
نظرات مطالب
EF Code First #1
در بعضی موارد هنگام کار با EF چنین خطایی رخ میده
Validation failed for one or more entities. See 'EntityValidationErrors' property for more details 
البته اگر من از طریق زیر عمل کنم هیچ اتفاق نمیفته و درج انجام میشه
 db.Entry(message).State = EntityState.Added;
 db.SaveChanges();
حالا تفاوت این دو روش db.messages.add با db.entry چه تفاوتی داره؟
یکی سری کدها هم داخل نت برای catch کردن DbEntityValidationException  وجود داره ولی هیچ وقت وارد catch نمیشه ، مثل اینکه نوع استثنا رخ داده متفاوته
نمونه کدهای موجود
try
{
    // Your code...
    // Could also be before try if you know the exception occurs in SaveChanges

    context.SaveChanges();
}
catch (DbEntityValidationException e)
{
    foreach (var eve in e.EntityValidationErrors)
    {
        Console.WriteLine("Entity of type \"{0}\" in state \"{1}\" has the following validation errors:",
            eve.Entry.Entity.GetType().Name, eve.Entry.State);
        foreach (var ve in eve.ValidationErrors)
        {
            Console.WriteLine("- Property: \"{0}\", Error: \"{1}\"",
                ve.PropertyName, ve.ErrorMessage);
        }
    }
    throw;
}

اشتراک‌ها
مقدمه ای بر برنامه نویسی همزمان

What is concurrent programing? Simply described, it’s when you are doing more than one thing at the same time. Not to be confused with parallelism, concurrency is when multiple sequences of operations are run in overlapping periods of time. In the realm of programming, concurrency is a pretty complex subject. Dealing with constructs such as threads and locks and avoiding issues like race conditions and deadlocks can be quite cumbersome, making concurrent programs difficult to write. Through concurrency, programs can be designed as independent processes working together in a specific composition. Such a structure may or may not be made parallel; however, achieving such a structure in your program offers numerous advantages. 

مقدمه ای بر برنامه نویسی همزمان
اشتراک‌ها
چطور کارهامون رو به صورت Async انجام بدیم با استفاده از Channel و HostedService

چطور کارهامون رو به صورت Async انجام بدیم با استفاده از Channel و HostedService

I hope you are satisfied with this tutorial. In these two articles, we tried to tell you the ways in which we can do things with maximum efficiency in full Async, without worrying about the completion of the Request and the Disposal of our service. These have always been among the concerns of various programmers. And always using inefficient methods such as not leaving the word await 

چطور کارهامون رو به صورت Async انجام بدیم با استفاده از Channel و HostedService
نظرات مطالب
تجربه‌ای ناخوشایند از اثر به روز رسانی‌ها بر روی TFS
از تجربه‌ی کاری مفیدی که با ما به اشتراک گذاشتید تشکر می‌کنم.
SharePoint هم وضع بهتری نداره. نصب یک سرویس پک روی آن و جان سالم به در بردن، نیاز به دعا و نذر و نیاز دارد!
علت این مساله هم می‌تونه موردی باشه که عضو سابق تیم ASP.NET MVC عنوان کرده:
Some of it, though, has to be attributed to the fact that Microsoft isn't a big company... it's a dozen big companies. And it's not a dozen big companies, but thousands of small companies. As an individual contributor in particular it's easy to pretend that the company is your project, or your group, and ignore the other 90 thousand people.
Leaving Microsoft 


اشتراک‌ها
کانورتور عمومی برای مقادیر در WPF

This post provides a simple IValueConverter implementation that makes use of the framework type converters in order to convert between a large range of source / target types. This converter can be used both within bindings and in code-behind to give more concise property setters. 

کانورتور عمومی برای مقادیر در WPF