Assembly StockSharp.Algo.dll, v4.0.30319, QuotingStrategy~/topic/2590/assembly-stocksharp_algo_dll-v4_0_30319-quotingstrategy/Copyright @ StockSharp Platform LLC 2010 - 20242024-03-28T16:49:59Zhttps://stocksharp.com/images/logo.pnghttps://stocksharp.com/posts/m/18211/Спасибо!2012-04-13T11:02:43Z2012-04-13T11:02:43Ztopic959https://stocksharp.com/users/709/info@stocksharp.comСпасибо!Copyright @ StockSharp Platform LLC 2010 - 2024https://stocksharp.com/posts/m/18208/public decimal? CurrentBestPrice { get; } знак вопроса после decimal - ошибка? http://msdn.microsoft...2012-04-13T09:21:55Z2012-04-13T09:21:55ZSergey Masyurahttps://stocksharp.com/users/701/info@stocksharp.com<div class="quote"><span class="quotetitle">topic959 <a href="https://stocksharp.com/posts/m/18192/"><img src="https://stocksharp.com/images/icon_latest_reply.gif" title="Go to" alt="Go to" /></a></span><div class="innerquote">public decimal? CurrentBestPrice { get; }<br /><br />знак вопроса после decimal - ошибка?</div></div><br /><br /><a target="_blank" href="http://msdn.microsoft.com/en-us/library/1t3y8s4s.aspx?ppud=4
" title="http://msdn.microsoft.com/en-us/library/1t3y8s4s.aspx?ppud=4
">http://msdn.microsoft.co...ry/1t3y8s4s.aspx?ppud=4
</a><br /><br />Nullable types have the following characteristics:<br /><br />Nullable types represent value-type variables that can be assigned the value of null. You cannot create a nullable type based on a reference type. (Reference types already support the null value.)<br /><br />The syntax T? is shorthand for Nullable(Of T), where T is a value type. The two forms are interchangeable.<br /><br />Assign a value to a nullable type just as you would for an ordinary value type, for example int? x = 10; or double? d = 4.108. A nullable type can also be assigned the value null: int? x = null.<br /><br />Use the Nullable(Of T).GetValueOrDefault method to return either the assigned value, or the default value for the underlying type if the value is null, for example int j = x.GetValueOrDefault();<br /><br />Use the HasValue and Value read-only properties to test for null and retrieve the value, as shown in the following example: if(x.HasValue) j = x.Value;<br /><br />The HasValue property returns true if the variable contains a value, or false if it is null.<br /><br />The Value property returns a value if one is assigned. Otherwise, a System.InvalidOperationException is thrown.<br /><br />The default value for HasValue is false. The Value property has no default value.<br /><br />You can also use the == and != operators with a nullable type, as shown in the following example: if (x != null) y = x;<br /><br />Use the ?? operator to assign a default value that will be applied when a nullable type whose current value is null is assigned to a non-nullable type, for example int? x = null; int y = x ?? -1;<br /><br />Nested nullable types are not allowed. The following line will not compile: Nullable<Nullable<int>> n;Copyright @ StockSharp Platform LLC 2010 - 2024https://stocksharp.com/posts/m/18205/decimal не может принимать значение null, а decimal? - может2012-04-13T08:22:26Z2012-04-13T08:22:26ZКот Матроскинhttps://stocksharp.com/users/808/info@stocksharp.comdecimal не может принимать значение null, а decimal? - можетCopyright @ StockSharp Platform LLC 2010 - 2024https://stocksharp.com/posts/m/18193/нет2012-04-12T21:16:05Z2012-04-12T21:16:05ZAlexanderhttps://stocksharp.com/users/2826/info@stocksharp.comнетCopyright @ StockSharp Platform LLC 2010 - 2024https://stocksharp.com/posts/m/18192/public decimal? CurrentBestPrice { get; } знак вопроса после decimal - ошибка?2012-04-12T21:00:26Z2012-04-12T21:00:26Ztopic959https://stocksharp.com/users/709/info@stocksharp.compublic decimal? CurrentBestPrice { get; }<br /><br />знак вопроса после decimal - ошибка?Copyright @ StockSharp Platform LLC 2010 - 2024