15.Visual Studio 2017 15.9 منتشر شد
These are the issues addressed in 15.9.15:
- Updated signing of VC Redist packages to enable continued deployment on Windows XP. This fix may have an increased chance of requiring a reboot of the machine in order to install an updated VC++ Redistributable package.
- Fixed in issue where GoToDefinition does not work for JavaScript in script blocks of cshtml files.
- Calling pmr monotonic_buffer_resource release will corrupt memory.
- Fix for HRESULT E_FAIL build error in some C++ projects when upgrading to 15.9.13
Security Advisory Notices
کنفرانس Connect(); 2018
Tune in online on December 4, 2018 for a full day of dev-focused delight—including updates on Azure and Visual Studio, keynotes, demos, and real-time coding with experts—live from the Microsoft Azure and AI Conference.
تفاوت انواع var و dynamic
The dynamic keyword acts as a static type declaration in the C# type system. This way C# got the dynamic features and at the same time remained a statically typed language.
http://msdn.microsoft.com/en-us/magazine/gg598922.aspx
شاید اگر بگوییم dynamic نوعی static است که مزایای انواع dynamic را در بر میگیرد بهتر باشد.
خواندن این مقاله هم خالی از لطف نیست:
حتی یک مطلب کوچولو هم برای آن آماده کرده و در سیستم اتوماتیک وبلاگم برای انتشار گذاشتهام.
انتشار SQL Server 2016 CTP 3.1
New In-Memory OLTP improvements in CTP3.1 include:
- Unique indexes in memory-optimized tables, to complement the support for unique constraints that was released in CTP3
- LOB data types varchar(max), nvarchar(max), and varbinary(max) in memory-optimized tables and natively compiled modules
- Indexes with NULLable key columns in memory-optimized tables
Syntax inputdate AT TIME ZONE timezone.
- Inputdate: An expression that can be resolved to a smalldatetime, datetime, datetime2, or datetimeoffset value.
- Timezone: Name of the destination time zone in standard format as enumerated by Windows. Available time zones can be found by querying sys.time_zone_info.
SQL Server Analysis Services (SSAS) updates allow upgrading your existing models to 1200 compatibility level and a JSON editor for SSDT;
Web-based applications run smoother if instead of using the traditional form method, they use JavaScript to post data to the server and to update the user interface after posting data: It also makes it easier to keep POST and GET actions separated. SignalR makes it even slicker; it can even update multiple pages at the same time. Is it time to use JavaScript to post data rather than posting via the browser the traditional way?
معرفی ویژگی جدید StringSyntax
با استفاده از ویژگی StringSyntax جدید میتوان مقدار مورد انتظار از رشتهی درخواستی را معنادار کرد. برای مثال، Visual Studio سالهاست که راهنمایی را در حین تعریف عبارات باقاعده ظاهر میکند. اما این راهنما صرفا مختص به ویژوال استودیو است و تا پیش از این راهی وجود نداشت تا عنوان کنیم که برای مثال این رشته قرار است تنها یک عبارت باقاعده باشد. اکنون در دات نت 7 با معرفی ویژگی جدید StringSyntax میتوان یک چنین intellisense ای را در سایر IDEها نیز شاهد بود.
برای نمونه مثال زیر را درنظر بگیرید:
using System.Diagnostics.CodeAnalysis; namespace CS11Tests; public class StringSyntaxAttributeTests { public static void Test() { RegexTest(""); DateTest(""); } private static void RegexTest([StringSyntax(StringSyntaxAttribute.Regex)] string regex) { } private static void DateTest([StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string dateTime) { } }
راهنمای ظاهر شده جهت تعریف سادهتر عبارات باقاعده:
و راهنمای ظاهر شده جهت تعریف سادهتر یک DateTime:
امکان استفاده از StringSyntax در دات نتهای پیش از نگارش 7
هرچند StringSyntax در دات نت 7 تعریف شدهاست؛ اما اگر تعریف کلاس زیر را به همراه فضای نام دقیق آن به پروژههای قدیمیتر هم اضافه کنیم ... برای دات نتهای پیش از نگارش 7 هم کار میکند:
#if !NET7_0_OR_GREATER namespace System.Diagnostics.CodeAnalysis { /// <summary>Specifies the syntax used in a string.</summary> [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] public sealed class StringSyntaxAttribute : Attribute { /// <summary>The syntax identifier for strings containing composite formats for string formatting.</summary> public const string CompositeFormat = "CompositeFormat"; /// <summary>The syntax identifier for strings containing date format specifiers.</summary> public const string DateOnlyFormat = "DateOnlyFormat"; /// <summary>The syntax identifier for strings containing date and time format specifiers.</summary> public const string DateTimeFormat = "DateTimeFormat"; /// <summary>The syntax identifier for strings containing <see cref="T:System.Enum" /> format specifiers.</summary> public const string EnumFormat = "EnumFormat"; /// <summary>The syntax identifier for strings containing <see cref="T:System.Guid" /> format specifiers.</summary> public const string GuidFormat = "GuidFormat"; /// <summary>The syntax identifier for strings containing JavaScript Object Notation (JSON).</summary> public const string Json = "Json"; /// <summary>The syntax identifier for strings containing numeric format specifiers.</summary> public const string NumericFormat = "NumericFormat"; /// <summary>The syntax identifier for strings containing regular expressions.</summary> public const string Regex = "Regex"; /// <summary>The syntax identifier for strings containing time format specifiers.</summary> public const string TimeOnlyFormat = "TimeOnlyFormat"; /// <summary>The syntax identifier for strings containing <see cref="T:System.TimeSpan" /> format specifiers.</summary> public const string TimeSpanFormat = "TimeSpanFormat"; /// <summary>The syntax identifier for strings containing URIs.</summary> public const string Uri = "Uri"; /// <summary>The syntax identifier for strings containing XML.</summary> public const string Xml = "Xml"; /// <summary>Initializes the <see cref="T:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute" /> with the identifier of the syntax used.</summary> /// <param name="syntax">The syntax identifier.</param> public StringSyntaxAttribute(string syntax) { this.Syntax = syntax; this.Arguments = Array.Empty<object>(); } /// <summary>Initializes the <see cref="T:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute" /> with the identifier of the syntax used.</summary> /// <param name="syntax">The syntax identifier.</param> /// <param name="arguments">Optional arguments associated with the specific syntax employed.</param> public StringSyntaxAttribute(string syntax, params object?[] arguments) { this.Syntax = syntax; this.Arguments = arguments; } /// <summary>Gets the identifier of the syntax used.</summary> public string Syntax { get; } /// <summary>Gets the optional arguments associated with the specific syntax employed.</summary> public object?[] Arguments { get; } } } #endif
using System; using System.Linq; using System.Windows.Forms; namespace WindowsFormsApplication2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { // این قسمت برای ورود اطلاعات به بانک است و با کمک کتابخانه پرژن دات نت تاریخ شمسی را به میلادی تبدیل و ذخیره میکنم using(var db = new h7Entities()) { var t = new test { ResponseDate = PersianDateTime.Parse(textBox1.Text).ToDateTime() }; db.test.Add(t); db.SaveChanges(); } } private void Form1_Load(object sender, EventArgs e) { // این قسمت هم فقط اطلاعات واکشی شده را در گرید نمایش میدهد . بدون هیچ شرطی ، یک سلکت ساده . . فقط از پرژن دانت نت برای تبدیل میلادی به شمسی کمک میگیرم using (var db = new h7Entities()) { dataGridView1.DataSource =(from t in db.test select new { Id= t.Id, time = new PersianDateTime(DateTime.Parse(t.ResponseDate.ToString())).ToString(PersianDateTimeFormat.DateShortTime) }).ToList(); } } } }
کتابخانه PersianDateTime را از نیوگت دریافت کردم .
ولی چیزی در گرید نمایش نمیدهد .
مدل برنامه هم :
public partial class test { public int Id { get; set; } public Nullable<System.DateTime> ResponseDate { get; set; } }
سوال دیگه اینکه وقتی تبدیلی انجام نمیشود ، خروجی زیر را دارم :
حالا چطور از فیلدی که تاریخ را نمایش میدهد فقط آن را تبدیل به شمسی و نمایش دهد ؟ شبیه این 1365/02/02 ؟
تشکر
نگاهی به Windows Package Manager 1.0
Benefits of a package manager
- Check the version of any program or package
- Update the Existing Version you already installed
- Download and install in just one Command
- Automates the process of installing, upgrading, configuring, and removing computer programs
- Upgrade all the program at once
- Export list of program that you've installed and install them back whenever you required