<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="https://www.schweda.net/style_feed.css" ?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:atom="http://www.w3.org/2005/Atom"	
	xmlns:dc="http://purl.org/dc/elements/1.1/" > 
<channel>
    <title>schweda.net - Blog</title>
    <link>https://www.schweda.net/</link>
    <description>schweda.net - Blog - Blog-Beitraege</description>
    <language>de-at</language>
    <copyright>Copyright 2006-2026</copyright>
    <generator>schweda.net</generator>
    <managingEditor>heinz.schweda@schweda.net (Heinz Schweda)</managingEditor>
    <webMaster>heinz.schweda@schweda.net (Heinz Schweda)</webMaster>
    <category>Blog</category>
	<atom:link href="https://schweda.net/blog_rss.php?bid=611" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[Zwei Maps zu einer zusammenführen]]></title>
<description><![CDATA[
<p>Vor kurzem wollte ich zwei Maps zu einer zusammenf&uuml;hren, habe daf&uuml;r aber keine geeignete Funktion gefunden, deshalb habe ich mir die folgende selbst geschrieben.
</p>


<pre class="pre_blog_axcode">
private Map mergeMaps(Map _map1, Map _map2)
{
    Map retMap;
    MapEnumerator mapEnum;
    // Initate first map from second map if empty
    if( !_map1)
    {
        _map1 = new Map(_map2.keyType(), _map2.valueType());
    }
    // Check compatibility
    if(_map1 &amp;&amp; _map2)
    {
        if(_map1.keyType() != _map2.keyType() || _map1.valueType() != _map2.valueType())
        {
            throw error(Error::wrongUseOfFunction(funcName()));
        }
    }

    retMap = _map1;
    mapEnum = _map2.getEnumerator();
    while(mapEnum.moveNext())
    {
        if( !retMap.exists(mapEnum.currentKey()))
        {
            retMap.insert(mapEnum.currentKey(), mapEnum.currentValue());
        }
    }
    return retMap;
}
</pre>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Sun, 27 Nov 2016 18:00:00 +0100</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=611</link>
<comments>https://www.schweda.net/blog_ax.php?bid=611</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=611</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=611</wfw:commentRss>
</item>
</channel>
</rss>	
