AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 24.04.2008, 20:19   #1  
Blog bot is offline
Blog bot
Участник
 
25,477 / 846 (79) +++++++
Регистрация: 28.10.2006
axaptapedia: Set (Foundation class)
Источник: http://www.axaptapedia.com/Set_%28Foundation_class%29
==============

Summary:
'''Set (Foundation class)''' consist of a data set that contains values of the same type, where value is unique.

A Set is alway sorted on the value.
==How to use==
===Define===

Set s = new Set(Types::STRING);


===Insert a value===

s.add("Wassini");
s.add("Eric");


===Exists value===
To see if a value already is added, use the ''in'' method:

if (s.in("Wassini"))
print "Yes!";
else
print "No!";


===Getting values===
There are several ways to get the values in the set.

# Using a SetIterator
# Using a SetEnumerator

====SetIterator====
The SetIterator loops throug the complete set:


SetIterator si;

si = new SetIterator(s);

while (si.more())
{
print si.value();

si.next();
}

====SetEnumerator====
[[SetEnumerator class]] is like [[SetIterator class]], but with a slightly different interface

SetEnumerator se=s.getEnumerator();

while (se.moveNext())
{
print se.current();
}


===Removing values===
Just use the ''remove'' method to remove the active value.


s.remove("Wassini");


===Other methods===

// Get number of elements:
print s.elements();

// Get the used types:
print s.definitionString();

// Dump the whole set as a string:
print s.toString();


==See also==
*[[Collection classes]]

[[Category:General development]]


Источник: http://www.axaptapedia.com/Set_%28Foundation_class%29
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
axaptapedia: RunBaseBatch Blog bot DAX Blogs 0 04.04.2009 22:05
axaptapedia: RunBaseBatch Blog bot DAX Blogs 0 31.03.2009 06:06
axaptapedia: Image class Blog bot DAX Blogs 0 22.07.2008 15:05
axaptapedia: Array (Foundation class) Blog bot DAX Blogs 0 13.12.2007 22:30
Говорят вышел SP2 для Axapta 3. Кто нибуть что знает на эту тему? soin DAX: Прочие вопросы 10 13.10.2003 10:43

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 08:11.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.