﻿<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/css' href='https://stocksharp.ru/css/style.css'?>
<?xml-stylesheet type='text/css' href='https://stocksharp.ru/css/bbeditor.css'?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html">Как привести объект AlfaTimeFrames к TimeSpan значению?</title>
  <id>~/topic/1832/kak-privesti-obekt-alfatimeframes-k-timespan-znacheniyu/</id>
  <rights type="text">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  <updated>2026-06-15T11:13:18Z</updated>
  <logo>https://stocksharp.ru/images/logo.png</logo>
  <link href="https://stocksharp.ru/handlers/atom.ashx?category=topic&amp;id=1832" rel="self" type="application/rss+xml" />
  <entry>
    <id>https://stocksharp.ru/posts/m/10550/</id>
    <title type="text">watashi: _timeFrame = (TimeSpan)((ComboBoxItem)timeFrameComboBox.SelectedItem).Tag; [thumbdn] _timeF...</title>
    <published>2011-08-23T14:07:13Z</published>
    <updated>2011-08-23T14:07:13Z</updated>
    <author>
      <name>Sergey Masyura</name>
      <uri>https://stocksharp.ru/users/701/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="@message(10532)" rel="nofollow" target="_blank"&gt;watashi&lt;/a&gt;:&lt;/strong&gt;
_timeFrame = (TimeSpan)((ComboBoxItem)timeFrameComboBox.SelectedItem).Tag; [thumbdn]
_timeFrame = (TimeSpan)(AlfaTimeFrames)((ComboBoxItem)timeFrameComboBox.SelectedItem).Tag; [thumbup]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Вероятно, приведение к ComboBoxItem можно убрать.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/10532/</id>
    <title type="text">_timeFrame = (TimeSpan)((ComboBoxItem)timeFrameComboBox.SelectedItem).Tag; [thumbdn] _timeFrame = (T...</title>
    <published>2011-08-22T18:21:11Z</published>
    <updated>2011-08-22T18:21:11Z</updated>
    <author>
      <name>watashi</name>
      <uri>https://stocksharp.ru/users/28457/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;_timeFrame = (TimeSpan)((ComboBoxItem)timeFrameComboBox.SelectedItem).Tag; [thumbdn]
_timeFrame = (TimeSpan)(AlfaTimeFrames)((ComboBoxItem)timeFrameComboBox.SelectedItem).Tag; [thumbup]&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/10531/</id>
    <title type="text">_timeFrame = (TimeSpan)((ComboBoxItem)timeFrameComboBox.SelectedItem).Tag; [thumbup] </title>
    <published>2011-08-22T17:54:59Z</published>
    <updated>2011-08-22T17:54:59Z</updated>
    <author>
      <name>watashi</name>
      <uri>https://stocksharp.ru/users/28457/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;_timeFrame = (TimeSpan)((ComboBoxItem)timeFrameComboBox.SelectedItem).Tag; [thumbup]&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/10476/</id>
    <title type="text">watashi: Как привести объект AlfaTimeFrames к TimeSpan значению? Спасибо. В классе AlfaTimeFrames ес...</title>
    <published>2011-08-20T08:39:31Z</published>
    <updated>2011-08-20T08:39:31Z</updated>
    <author>
      <name>Sergey Masyura</name>
      <uri>https://stocksharp.ru/users/701/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="@message(10458)" rel="nofollow" target="_blank"&gt;watashi&lt;/a&gt;:&lt;/strong&gt;
Как привести объект AlfaTimeFrames к TimeSpan значению?&lt;/p&gt;
&lt;p&gt;Спасибо.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;В классе AlfaTimeFrames есть перегруженный оператор приведения типа:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
/// &amp;lt;summary&amp;gt;
/// Привести объект &amp;lt;see cref=&amp;quot;AlfaTimeFrames&amp;quot;/&amp;gt; к &amp;lt;see cref=&amp;quot;TimeSpan&amp;quot;/&amp;gt; значению.
/// &amp;lt;/summary&amp;gt;
/// &amp;lt;param name=&amp;quot;timeFrame&amp;quot;&amp;gt;Объект &amp;lt;see cref=&amp;quot;AlfaTimeFrames&amp;quot;/&amp;gt;.&amp;lt;/param&amp;gt;
/// &amp;lt;returns&amp;gt;&amp;lt;see cref=&amp;quot;TimeSpan&amp;quot;/&amp;gt; значение.&amp;lt;/returns&amp;gt;
public static explicit operator TimeSpan(AlfaTimeFrames timeFrame)
{
	if (timeFrame == null)
		throw new ArgumentNullException(&amp;quot;timeFrame&amp;quot;);

	return timeFrame._value;
}

&lt;/code&gt;&lt;/pre&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/10458/</id>
    <title type="text">Как привести объект AlfaTimeFrames к TimeSpan значению? Спасибо. </title>
    <published>2011-08-19T14:42:07Z</published>
    <updated>2011-08-19T14:42:07Z</updated>
    <author>
      <name>watashi</name>
      <uri>https://stocksharp.ru/users/28457/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;Как привести объект AlfaTimeFrames к TimeSpan значению?&lt;/p&gt;
&lt;p&gt;Спасибо.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
</feed>