Systems.Collections.Generic.List T Requires 1 Type of Argument?

I am having troubles with my code. I am trying to start a list entitles "studentList" and it is supposed to allow the user to enter in a list of student names and their ages. 
Below is my code and this is a windows Forms:
<code>
List<Student> studentList = new List();
        private void btnAddStudent_Click(object sender, EventArgs e)
        private void btnShowStudents_Click(object sender, EventArgs e)
            List<Student> sortedList = studentList.OrderBy(o => o.LastName).
                                              ThenBy(o => o.FirstName).ToList();
            String outputStr = "";
            foreach (Student s in sortedList)
                if (outputStr != "")
                    outputStr += "\n--------------\n";
                outputStr += s.ToString();
            if (outputStr == "")
                outputStr = "No Student Records Yet!";
            MessageBox.Show(outputStr);
</code>
I have other code as well but this is the problem area. I am getting a Systems.Collections.Generic.List<T> Requires 1 Type of Argument error on this line of code: List<Student> studentList = new List(); and I cannot figure out why.
If I change it to List<string>studentList = new List<string>(); I get an error later on in the code.
I'm sorry if this is confusing but this is a really complex assignment that I've been working on for hours and I'm completely frustrated because I'm so close to finishing.
Any help would be appreciated!
Thanks :)

I am having troubles with my code.
If you post this to a C# and not to a VB forum, you'll have the chance all your troubles are gone. :)
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral
Armin

Similar Messages

  • Cannot implicitly convert type 'Microsoft.SharePoint.SPListItemCollection' to 'System.Collections.Generic.List T '_

    Hi
    I want use SPListItemCollection' to 'System.Collections.Generic.List<T>'.
    How to achieve this.
    Thanks,
    Siva.

    Hi Siva,
    This is how I code it for looping all SPListItem in the SPListItemCollection using Generic List<T>
    public IEnumerable GetEnumerator()
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
    using (SPWeb web = site.OpenWeb())
    var list = web.Lists["Friends"];
    var query = new SPQuery();
    query.Query = "<FieldRef Name='ID'/>";
    IEnumerable items = list.GetItems(query);
    return items;
    Then calling the method would be
    var items = GetEnumerator();
    foreach(SPListItem item in items)
    Response.Write(item["FirstName"]);
    Murugesa Pandian| MCPD | MCTS |SharePoint 2010

  • Reference to "System.Collection.Generic.List"

    Encountered a problem when making a .NET method call:
    MT8855.StatusCode SetBluetoothProfile(
    MT8855.BluetoothProfileConfiguration newProfileConfiguration,
    ref List<MT8855.InvalidSettingInfo> invalidList
    Parameters
    newProfileConfiguration
    Type: Anritsu.MMD.MT8855x.TestSet.MT8855.BluetoothProfileConfiguration
    The structure containing the new settings.
    invalidList
    Type: System.Collections.Generic.List (Of <MT8855.InvalidSettingInfo>)
    A list to hold information about any settings that are invalid.
    Return Value
    Status code indicating the success or otherwise of the call.
    What should I do in TestStand to pass the reference of the list? 

    Hi,
    Just also visit this thread
    http://forums.ni.com/t5/NI-TestStand/How-to-iterat​e-though-a-net-dictionary/td-p/1232557
    Regards
    juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • Collection Generics ,  List ? super T List ? extends T List T

    Can you please tell me
    The difference beteen
    List<? super T>
    List<? extends T>
    List<T>
    Thanks..

    Hi,
    Just to remind our self about generic
    When a generic type is instantiated, the compiler translates those types by a technique called type erasure � a process where the compiler removes all information related to type parameters and type arguments within a class or method. Type erasure enables Java applications that use generics to maintain binary compatibility with Java libraries and applications that were created before generics
    Now your method returns a type parameter T and T is already defined in the type argument in your method.
    This type parameter has some special definition which is
    It extends the comparable
    The comparable has a type which is super to T
    So there is a class which define a type parameter T like that
    class A<T> {
    private T t;
    In you implementation i.e. when you populate the List<T>, you will populate it with Long as your preference type since Long fullfill you predefined parameter type conditioins
    public class Test {
         public static <T extends Comparable<? super T>> T findMaxMin(List<T> list, boolean max) {
             Collections.sort(list);
             if (!list.isEmpty()) {
                 if (max) {
                     return list.get(list.size() - 1);
                 } else {
                     return list.get(0);
             } else {
                  return new A<T>().getValue();
         public static void main(String args) {
              List<Long> ls = new ArrayList<Long>();
              ls.add(new Long(234234));
              Long lon = Test.findMaxMin(ls,true);
    static class A<T>  {
         private T t;
         public void setValue(T t) {
              this.t = t;
          public  T  getValue() {
                return t;
      }Your method will return null when you send an empty list;
    I hope this could help
    Regards,
    Alan Mehio
    London, UK

  • Calling a Web Service in a SSRS Report - Error Converting String to Generic List of Strings

    Hello,
    I am using SSRS version 2005 and am trying to call a web service to retrieve data for a SSRS report.  I've looked on Google and MSDN for the past 2 days and have exhausted all options.  Here are the details...
    The web service method I am calling accepts 4 parameters...
    Parameter 1 = Generic list of strings
    Parameter 2 = DateTime
    Parameter 3 = Int
    Parameter 4 = Int
    I have created a function (on the CODE tab in report properties) in my report that gets passed a comma delimited string and returns a Generic List of Strings that I use to format Parameter 1.  The code for the function is as follows:
    Public Function GetIDs(ByVal IDList as String) As List(Of String)
       Dim stringArray() = IDList.Split(",")
       Dim genericList As New List(Of String)(stringArray)
       Return genericList
    End Function
    I am passing a string to the function that looks something like this:
    "1,2,3,4"
    When I try to PREVIEW the report, I get an error that reads:
    "There is an error on line 0 of custom code: [BC30002] Type 'List' is not defined"
    I've tried changing the function declaration to pass back a string array:
    Public Function GetIDs(ByVal IDList as String) As String()
        Return IDList.Split(","c)
    End Function
    This returned the error (from the web service): 
    "Error in line 5 position 22.  Expecting state 'Element'.. Encountered 'Text' with name ", namespace"
    I have also tried changing the function declaration to pass back an array: 
    Public Function GetIDs(ByVal IDList as String) As ARRAY
    This also produced the error:
    "Error in line 5 position 22.  Expecting state 'Element'.. Encountered 'Text' with name ", namespace"
    I know that this particular web service method DOES work because it is coded to accept nulls in the first parameter.  So... when I call the method with nulls, it returns a recordset of ALL data (this works fine).  Only when I pass a string to the function (which "filters" the recordset by the ID list), does the error occur.
    Is SRSS limited with respect to VB.NET code so that the List(Of String) statement is not recognized?  Has anyone done this before and if so, how did you convert a comma delimited string to a Generic List of Strings within a function in the SSRS report?
    Any info would be greatly appreciated.
    Thanks!
    Bob

    Hi Bob,
    By default, in custom code, in order to use a variable or function that is not in the "System" namespace, we need to provide the full name.
    In this case, the full name of the "List" is "System.Collections.Generic.List"
    So, to solve the issue, please use the following code:
    Public Function GetIDs(ByVal IDList as String) As System.Collections.Generic.List(Of String)
    Dim stringArray() = IDList.Split(",")
    Dim genericList As New System.Collections.Generic.List(Of String)(stringArray)
    Return genericList
    End Function
    If you have any more questions, please feel free to ask.
    Thanks,
    Jin Chen
    Jin Chen - MSFT

  • Error_1_Inconsistent accessibility: property type 'System.Collections.ObjectModel.ObservableCollection WindowsBlogReader.FeedData ' is less accessible than property 'WindowsBlogReader.FeedDataSource.Feeds'

    using System;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Windows.Web.Syndication;
    namespace WindowsBlogReader
       public class FeedData
            public string Title { get; set; }
            public string Description { get; set; }
            public DateTime PubDate { get; set; }
            private List<FeedItem> _Items = new List<FeedItem>();
            public List<FeedItem> Items
                get
                    return this._Items;
        // FeedItem
        // Holds info for a single blog post.
        public class FeedItem
            public string Title { get; set; }
            public string Author { get; set; }
            public string Content { get; set; }
            public DateTime PubDate { get; set; }
            public Uri Link { get; set; }
        // FeedDataSource
        // Holds a collection of blog feeds (FeedData), and contains methods needed to
        // retreive the feeds.
        public class FeedDataSource
            private ObservableCollection<FeedData> _Feeds = new ObservableCollection<FeedData>();
            public ObservableCollection<FeedData> Feeds         //Error Here//
                get
                    return this._Feeds;
            public async Task GetFeedsAsync()
                Task<FeedData> feed1 =
                    GetFeedAsync("http://windowsteamblog.com/windows/b/developers/atom.aspx");
                Task<FeedData> feed2 =
                    GetFeedAsync("http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx");
                Task<FeedData> feed3 =
                    GetFeedAsync("http://windowsteamblog.com/windows/b/extremewindows/atom.aspx");
                Task<FeedData> feed4 =
                    GetFeedAsync("http://windowsteamblog.com/windows/b/business/atom.aspx");
                Task<FeedData> feed5 =
                    GetFeedAsync("http://windowsteamblog.com/windows/b/bloggingwindows/atom.aspx");
                Task<FeedData> feed6 =
                    GetFeedAsync("http://windowsteamblog.com/windows/b/windowssecurity/atom.aspx");
                Task<FeedData> feed7 =
                    GetFeedAsync("http://windowsteamblog.com/windows/b/springboard/atom.aspx");
                Task<FeedData> feed8 =
                    GetFeedAsync("http://windowsteamblog.com/windows/b/windowshomeserver/atom.aspx");
                // There is no Atom feed for this blog, so use the RSS feed.
                Task<FeedData> feed9 =
                    GetFeedAsync("http://windowsteamblog.com/windows_live/b/windowslive/rss.aspx");
                Task<FeedData> feed10 =
                    GetFeedAsync("http://windowsteamblog.com/windows_live/b/developer/atom.aspx");
                Task<FeedData> feed11 =
                    GetFeedAsync("http://windowsteamblog.com/ie/b/ie/atom.aspx");
                Task<FeedData> feed12 =
                    GetFeedAsync("http://windowsteamblog.com/windows_phone/b/wpdev/atom.aspx");
                Task<FeedData> feed13 =
                    GetFeedAsync("http://windowsteamblog.com/windows_phone/b/wmdev/atom.aspx");
                Task<FeedData> feed14 =
                    GetFeedAsync("http://windowsteamblog.com/windows_phone/b/windowsphone/atom.aspx");
                this.Feeds.Add(await feed1);
                this.Feeds.Add(await feed2);
                this.Feeds.Add(await feed3);
                this.Feeds.Add(await feed4);
                this.Feeds.Add(await feed5);
                this.Feeds.Add(await feed6);
                this.Feeds.Add(await feed7);
                this.Feeds.Add(await feed8);
                this.Feeds.Add(await feed9);
                this.Feeds.Add(await feed10);
                this.Feeds.Add(await feed11);
                this.Feeds.Add(await feed12);
                this.Feeds.Add(await feed13);
                this.Feeds.Add(await feed14);
            private async Task<FeedData> GetFeedAsync(string feedUriString)
                Windows.Web.Syndication.SyndicationClient client = new SyndicationClient();
                Uri feedUri = new Uri(feedUriString);
                try
                    SyndicationFeed feed = await client.RetrieveFeedAsync(feedUri);
                    // This code is executed after RetrieveFeedAsync returns the SyndicationFeed.
                    // Process the feed and copy the data you want into the FeedData and FeedItem classes.
                    FeedData feedData = new FeedData();
                    if (feed.Title != null && feed.Title.Text != null)
                        feedData.Title = feed.Title.Text;
                    if (feed.Subtitle != null && feed.Subtitle.Text != null)
                        feedData.Description = feed.Subtitle.Text;
                    if (feed.Items != null && feed.Items.Count > 0)
                        // Use the date of the latest post as the last updated date.
                        feedData.PubDate = feed.Items[0].PublishedDate.DateTime;
                        foreach (SyndicationItem item in feed.Items)
                            FeedItem feedItem = new FeedItem();
                            if (item.Title != null && item.Title.Text != null)
                                feedItem.Title = item.Title.Text;
                            if (item.PublishedDate != null)
                                feedItem.PubDate = item.PublishedDate.DateTime;
                            if (item.Authors != null && item.Authors.Count > 0)
                                feedItem.Author = item.Authors[0].Name.ToString();
                            // Handle the differences between RSS and Atom feeds.
                            if (feed.SourceFormat == SyndicationFormat.Atom10)
                                if (item.Content != null && item.Content.Text != null)
                                    feedItem.Content = item.Content.Text;
                                if (item.Id != null)
                                    feedItem.Link = new Uri("http://windowsteamblog.com" + item.Id);
                            else if (feed.SourceFormat == SyndicationFormat.Rss20)
                                if (item.Summary != null && item.Summary.Text != null)
                                    feedItem.Content = item.Summary.Text;
                                if (item.Links != null && item.Links.Count > 0)
                                    feedItem.Link = item.Links[0].Uri;
                            feedData.Items.Add(feedItem);
                    return feedData;
                catch (Exception)
                    return null;
            // Returns the feed that has the specified title.
            public static FeedData GetFeed(string title)             //ERROR HERE
                // Simple linear search is acceptable for small data sets
                var _feedDataSource = App.Current.Resources["feedDataSource"] as FeedDataSource;
                var matches = _feedDataSource.Feeds.Where((feed) => feed.Title.Equals(title));
                if (matches.Count() == 1) return matches.First();
                FeedData feeddata = null;
                return feeddata;
            // Returns the post that has the specified title.
            public static FeedItem GetItem(string uniqueId)
                // Simple linear search is acceptable for small data sets
                var _feedDataSource = App.Current.Resources["feedDataSource"] as FeedDataSource;
                var _feeds = _feedDataSource.Feeds;
                var matches = _feedDataSource.Feeds.SelectMany(group => group.Items).Where((item) => item.Title.Equals(uniqueId));
                if (matches.Count() == 1) return matches.First();
                return null;
    }

    The feed links given in the msdn site are already broken because now the official site for windows blogs is "blogs.windows.com" & not "windowsteamblogs.com". I am posting the updated code here :-
    using System;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.Linq;
    using System.Threading.Tasks;
    using Windows.Web.Syndication;
    namespace WindowsBlogReader
    // FeedData
    // Holds info for a single blog feed, including a list of blog posts (FeedItem).
    public class FeedData
    public string Title { get; set; }
    public string Description { get; set; }
    public DateTime PubDate { get; set; }
    private List<FeedItem> _Items = new List<FeedItem>();
    public List<FeedItem> Items
    get
    return this._Items;
    // FeedItem
    // Holds info for a single blog post.
    public class FeedItem
    public string Title { get; set; }
    public string Author { get; set; }
    public string Content { get; set; }
    public DateTime PubDate { get; set; }
    public Uri Link { get; set; }
    // FeedDataSource
    // Holds a collection of blog feeds (FeedData), and contains methods needed to
    // retreive the feeds.
    public class FeedDataSource
    private ObservableCollection<FeedData> _Feeds = new ObservableCollection<FeedData>();
    public ObservableCollection<FeedData> Feeds
    get
    return this._Feeds;
    public async Task GetFeedsAsync()
    #region WindowsTeamBlogs Feed Links
    //Task<FeedData> feed1 =
    // GetFeedAsync("http://windowsteamblog.com/windows/b/developers/atom.aspx");
    //Task<FeedData> feed2 =
    // GetFeedAsync("http://windowsteamblog.com/windows/b/windowsexperience/atom.aspx");
    //Task<FeedData> feed3 =
    // GetFeedAsync("http://windowsteamblog.com/windows/b/extremewindows/atom.aspx");
    //Task<FeedData> feed4 =
    // GetFeedAsync("http://windowsteamblog.com/windows/b/business/atom.aspx");
    //Task<FeedData> feed5 =
    // GetFeedAsync("http://windowsteamblog.com/windows/b/bloggingwindows/atom.aspx");
    //Task<FeedData> feed6 =
    // GetFeedAsync("http://windowsteamblog.com/windows/b/windowssecurity/atom.aspx");
    //Task<FeedData> feed7 =
    // GetFeedAsync("http://windowsteamblog.com/windows/b/springboard/atom.aspx");
    //Task<FeedData> feed8 =
    // GetFeedAsync("http://windowsteamblog.com/windows/b/windowshomeserver/atom.aspx");
    //// There is no Atom feed for this blog, so use the RSS feed.
    //Task<FeedData> feed9 =
    // GetFeedAsync("http://windowsteamblog.com/windows_live/b/windowslive/rss.aspx");
    //Task<FeedData> feed10 =
    // GetFeedAsync("http://windowsteamblog.com/windows_live/b/developer/atom.aspx");
    //Task<FeedData> feed11 =
    // GetFeedAsync("http://windowsteamblog.com/ie/b/ie/atom.aspx");
    //Task<FeedData> feed12 =
    // GetFeedAsync("http://windowsteamblog.com/windows_phone/b/wpdev/atom.aspx");
    //Task<FeedData> feed13 =
    // GetFeedAsync("http://windowsteamblog.com/windows_phone/b/wmdev/atom.aspx");
    //Task<FeedData> feed14 =
    // GetFeedAsync("http://windowsteamblog.com/windows_phone/b/windowsphone/atom.aspx");
    #endregion
    #region Windows Blogs Broken Links
    //Task<FeedData> feed1 =
    // GetFeedAsync("http://blogs.windows.com/skydrive/b/skydrive/atom.aspx");
    //Task<FeedData> feed2 =
    // GetFeedAsync("http://blogs.windows.com/windows/b/windowsexperience/atom.aspx");
    //Task<FeedData> feed3 =
    // GetFeedAsync("http://blogs.windows.com/windows/b/extremewindows/atom.aspx");
    //Task<FeedData> feed4 =
    // GetFeedAsync("http://blogs.windows.com/windows/b/business/atom.aspx");
    //Task<FeedData> feed5 =
    // GetFeedAsync("http://blogs.windows.com/windows/b/bloggingwindows/atom.aspx");
    //Task<FeedData> feed6 =
    // GetFeedAsync("http://blogs.windows.com/windows/b/windowssecurity/atom.aspx");
    //Task<FeedData> feed7 =
    // GetFeedAsync("http://blogs.windows.com/windows/b/springboard/atom.aspx");
    //Task<FeedData> feed8 =
    // GetFeedAsync("http://blogs.windows.com/windows/b/windowshomeserver/atom.aspx");
    //// There is no Atom feed for this blog, so use the RSS feed.
    //Task<FeedData> feed9 =
    // GetFeedAsync("http://blogs.windows.com/windows_live/b/windowslive/rss.aspx");
    //Task<FeedData> feed10 =
    // GetFeedAsync("http://blogs.windows.com/windows_live/b/developer/atom.aspx");
    //Task<FeedData> feed11 =
    // GetFeedAsync("http://blogs.windows.com/ie/b/ie/atom.aspx");
    //Task<FeedData> feed12 =
    // GetFeedAsync("http://blogs.windows.com/windows_phone/b/wpdev/atom.aspx");
    //Task<FeedData> feed13 =
    // GetFeedAsync("http://blogs.windows.com/windows_phone/b/wmdev/atom.aspx");
    //Task<FeedData> feed14 =
    // GetFeedAsync("http://blogs.windows.com/windows_phone/b/windowsphone/atom.aspx");
    #endregion
    #region Windows Blogs Feeds
    Task<FeedData> feed1 =
    GetFeedAsync("http://blogs.windows.com/windows/b/bloggingwindows/rss.aspx");
    Task<FeedData> feed2 =
    GetFeedAsync("http://blogs.windows.com/windows/b/windowsexperience/rss.aspx");
    Task<FeedData> feed3 =
    GetFeedAsync("http://blogs.windows.com/windows/b/extremewindows/rss.aspx");
    Task<FeedData> feed4 =
    GetFeedAsync("http://blogs.windows.com/windows/b/business/rss.aspx");
    Task<FeedData> feed5 =
    GetFeedAsync("http://blogs.windows.com/windows/b/windowssecurity/rss.aspx");
    Task<FeedData> feed6 =
    GetFeedAsync("http://blogs.windows.com/windows/b/springboard/rss.aspx");
    Task<FeedData> feed7 =
    GetFeedAsync("http://blogs.windows.com/windows/b/windowshomeserver/rss.aspx");
    Task<FeedData> feed8 =
    GetFeedAsync("http://blogs.windows.com/windows_live/b/windowslive/rss.aspx");
    Task<FeedData> feed9 =
    GetFeedAsync("http://blogs.windows.com/windows_live/b/developer/rss.aspx");
    Task<FeedData> feed10 =
    GetFeedAsync("http://blogs.windows.com/ie/b/ie/rss.aspx");
    Task<FeedData> feed11 =
    GetFeedAsync("http://blogs.windows.com/skydrive/b/skydrive/rss.aspx");
    Task<FeedData> feed12 =
    GetFeedAsync("http://blogs.windows.com/windows_phone/b/windowsphone/rss.aspx");
    Task<FeedData> feed13 =
    GetFeedAsync("http://blogs.windows.com/windows_phone/b/wpdev/rss.aspx");
    Task<FeedData> feed14 =
    GetFeedAsync("http://blogs.windows.com/windows_phone/b/wmdev/rss.aspx");
    #endregion
    #region Downloading the Feeds
    this.Feeds.Add(await feed1);
    this.Feeds.Add(await feed2);
    this.Feeds.Add(await feed3);
    this.Feeds.Add(await feed4);
    this.Feeds.Add(await feed5);
    this.Feeds.Add(await feed6);
    this.Feeds.Add(await feed7);
    this.Feeds.Add(await feed8);
    this.Feeds.Add(await feed9);
    this.Feeds.Add(await feed10);
    this.Feeds.Add(await feed11);
    this.Feeds.Add(await feed12);
    this.Feeds.Add(await feed13);
    this.Feeds.Add(await feed14);
    #endregion
    private async Task<FeedData> GetFeedAsync(string feedUriString)
    Windows.Web.Syndication.SyndicationClient client = new SyndicationClient();
    Uri feedUri = new Uri(feedUriString);
    try
    SyndicationFeed feed = await client.RetrieveFeedAsync(feedUri);
    // This code is executed after RetrieveFeedAsync returns the SyndicationFeed.
    // Process the feed and copy the data you want into the FeedData and FeedItem classes.
    FeedData feedData = new FeedData();
    if (feed.Title != null && feed.Title.Text != null)
    feedData.Title = feed.Title.Text;
    if (feed.Subtitle != null && feed.Subtitle.Text != null)
    feedData.Description = feed.Subtitle.Text;
    if (feed.Items != null && feed.Items.Count > 0)
    // Use the date of the latest post as the last updated date.
    feedData.PubDate = feed.Items[0].PublishedDate.DateTime;
    foreach (SyndicationItem item in feed.Items)
    FeedItem feedItem = new FeedItem();
    if (item.Title != null && item.Title.Text != null)
    feedItem.Title = item.Title.Text;
    if (item.PublishedDate != null)
    feedItem.PubDate = item.PublishedDate.DateTime;
    if (item.Authors != null && item.Authors.Count > 0)
    feedItem.Author = item.Authors[0].Name.ToString();
    // Handle the differences between RSS and Atom feeds.
    if (feed.SourceFormat == SyndicationFormat.Atom10)
    if (item.Content != null && item.Content.Text != null)
    feedItem.Content = item.Content.Text;
    if (item.Id != null)
    feedItem.Link = new Uri("http://windowsteamblog.com" + item.Id);
    else if (feed.SourceFormat == SyndicationFormat.Rss20)
    if (item.Summary != null && item.Summary.Text != null)
    feedItem.Content = item.Summary.Text;
    if (item.Links != null && item.Links.Count > 0)
    feedItem.Link = item.Links[0].Uri;
    feedData.Items.Add(feedItem);
    return feedData;
    catch (Exception)
    return null;
    // Returns the feed that has the specified title.
    public static FeedData GetFeed(string title)
    // Simple linear search is acceptable for small data sets
    var _feedDataSource = App.Current.Resources["feedDataSource"] as FeedDataSource;
    //var matches = _feedDataSource.Feeds.Where((feed) => feed.Title.Equals(title));
    var matches = _feedDataSource.Feeds.Where((feed) => feed != null && feed.Title.Equals(title));
    if (matches.Count() == 1) return matches.First();
    return null;
    // Returns the post that has the specified title.
    public static FeedItem GetItem(string uniqueId)
    // Simple linear search is acceptable for small data sets
    var _feedDataSource = App.Current.Resources["feedDataSource"] as FeedDataSource;
    var _feeds = _feedDataSource.Feeds;
    //var matches = _feedDataSource.Feeds.SelectMany(group => group.Items).Where((item) => item.Title.Equals(uniqueId));
    var matches = _feedDataSource.Feeds.SelectMany(group => group.Items).Where((item) => item != null && item.Title.Equals(uniqueId));
    if (matches.Count() == 1) return matches.First();
    return null;
    U will notice that there are 3 sets of list available here.
    The first set of links contain the old broken links from  "windowsteamblogs.com",
    the second set of links contain the links from  "blogs.windows.com" which are now also broken,
    the last set of links contain the links from  "blogs.windows.com" some of which are also broken.
    So if u run the program using those links u will get a "nullpointerexception" error.
    To solve this problem i updated a line of code in the "GetFeed" method from :- 
    var matches = _feedDataSource.Feeds.Where((feed) => feed.Title.Equals(title));
    to :- 
    var matches = _feedDataSource.Feeds.Where((feed) => feed != null && feed.Title.Equals(title));
    This line of code will ignore those empty(null) feeds.
    For safety sake i also updated the code in the "GetItem" method, and this "FeedDataSource" class will compile without any error, but he program will crash in split.xaml without giving any proper
    error message.
    Here are some of the links where people have faced similar problems :- 
    Runtime
    Error
    Parsing
    null feeds
    Problem
    in Page Navigation

  • Extra overhead with Collection and List types

    The documentation says about Collection and List types :
    "There is extra overhead for Kodo to maintain collections where each
    element is not guaranteed to be unique."
    Why is it so ?
    Thanks in advance.
    Regards.

    We can make some optimizations when we know each element is unique.

  • Strange memory behaviour using the System.Collections.Hashtable in object reference

    Dear all,
    Recently I came across a strange memory behaviour when comparing the system.collections.hashtable versus de scripting.dictionary object and thought to analyse it a bit in depth. First I thought I incorrectly destroyed references to the class and
    child classes but even when properly destroying them (and even implemented a "SafeObject" with deallocate method) I kept seeing strange memory behaviour.
    Hope this will help others when facing strange memory usage BUT I dont have a solution to the problem (yet) suggestions are welcome.
    Setting:
    I have a parent class that stores data in child classes through the use of a dictionary object. I want to store many differenct items in memory and fetching or alteging them must be as efficient as possible using the dictionary ability of retrieving key
    / value pairs. When the child class (which I store in the dictionary as value) contains another dictionary object memory handeling is as expected where all used memory is release upon the objects leaving scope (or destroyed via code). When I use a system.collection.hashtable
    no memory is released at all though apears to have some internal flag that marks it as useable for another system.collection.hashtable object.
    I created a small test snippet of code to test this behaviour with (running excel from the Office Plus 2010 version) The snippet contains a module to instantiate the parent class and child classes that will contain the data. One sub will test the Hash functionality
    and the other sub will test the dictionary functionality.
    Module1
    Option Explicit
    Sub testHash()
    Dim Parent As parent_class
    Dim d_Count As Double
    'Instantiate parent class
    Set Parent = New parent_class
    'Create a child using the hash collection object
    Parent.AddChildHash "TEST_hash"
    Dim d_CycleCount As Double
    d_CycleCount = 50000
    'Add dummy data records to the child container with x amount of data For d_Count = 0 To d_CycleCount
    Parent.ChildContainer("TEST_hash").InsertDataToHash CStr(d_Count), "dummy data"
    Next
    'Killing the parent when it goes out of scope should kill the childs. (Try it out and watch for the termination debug messages)
    'According to documentation and debug messages not really required!
    Set Parent.ChildContainer("TEST_hash") = Nothing
    'According to documentation not really as we are leaving scope but just to be consistent.. kill the parent!
    Set Parent = Nothing
    End Sub
    Sub testDict()
    Dim Parent As parent_class
    Dim d_Count As Double
    'Instantiate parent class
    Set Parent = New parent_class
    'Create a child using the dictionary object
    Parent.AddChildDict "TEST_dict"
    Dim d_CycleCount As Double
    d_CycleCount = 50000
    'Blow up the memory with x amount of records
    Dim s_SheetCycleCount As String
    s_SheetCycleCount = ThisWorkbook.Worksheets("ButtonSheet").Range("K2").Value
    If IsNumeric(s_SheetCycleCount) Then d_CycleCount = CDbl(s_SheetCycleCount)
    'Add dummy data records to the child container
    For d_Count = 0 To d_CycleCount
    Parent.ChildContainer("TEST_dict").InsertDataToDict CStr(d_Count), "dummy data"
    Next
    'Killing the parent when it goes out of scope should kill the childs. (Try it out and watch for the termination debug messages)
    'According to documentation and debug messages not really required!
    Set Parent.ChildContainer("TEST_dict") = Nothing
    'According to documentation not really as we are leaving scope but just to be consistent.. kill the parent!
    Set Parent = Nothing
    End Sub
    parent_class:
    Option Explicit
    Public ChildContainer As Object
    Private Counter As Double
    Private Sub Class_Initialize()
    Debug.Print "Parent initialized"
    Set ChildContainer = CreateObject("Scripting.dictionary")
    End Sub
    Public Sub AddChildHash(ByRef ChildKey As String)
    If Not ChildContainer.Exists(ChildKey) Then
    Dim TmpChild As child_class_hashtable
    Set TmpChild = New child_class_hashtable
    ChildContainer.Add ChildKey, TmpChild
    Counter = Counter + 1
    Set TmpChild = Nothing
    End If
    End Sub
    Public Sub AddChildDict(ByRef ChildKey As String)
    If Not ChildContainer.Exists(ChildKey) Then
    Dim TmpChild As child_class_dict
    Set TmpChild = New child_class_dict
    ChildContainer.Add ChildKey, TmpChild
    Counter = Counter + 1
    Set TmpChild = Nothing
    End If
    End Sub
    Private Sub Class_Terminate()
    Debug.Print "Parent being killed, first kill all childs (if there are any left!) - muahaha"
    Set ChildContainer = Nothing
    Debug.Print "Parent killed"
    End Sub
    child_class_dict
    Option Explicit
    Public MemmoryLeakObject As Object
    Private Sub Class_Initialize()
    Debug.Print "Child using Scripting.Dictionary initialized"
    Set MemmoryLeakObject = CreateObject("Scripting.Dictionary")
    End Sub
    Public Sub InsertDataToDict(ByRef KeyValue As String, ByRef DataValue As String)
    If Not MemmoryLeakObject.Exists(KeyValue) Then MemmoryLeakObject.Add KeyValue, DataValue
    End Sub
    Private Sub Class_Terminate()
    Debug.Print "Child using Scripting.Dictionary terminated"
    Set MemmoryLeakObject = Nothing
    End Sub
    child_class_hash:
    Option Explicit
    Public MemmoryLeakObject As Object
    Private Sub Class_Initialize()
    Debug.Print "Child using System.Collections.Hashtable initialized"
    Set MemmoryLeakObject = CreateObject("System.Collections.Hashtable")
    End Sub
    Public Sub InsertDataToHash(ByRef KeyValue As String, ByRef DataValue As String)
    If Not MemmoryLeakObject.ContainsKey(KeyValue) Then MemmoryLeakObject.Add KeyValue, DataValue
    End Sub
    Private Sub Class_Terminate()
    Debug.Print "Child using System.Collections.Hashtable terminated"
    Set MemmoryLeakObject = Nothing
    End Sub
    Statistics:
    TEST: (Chronologically ordered)
    1.1 Excel starting memory: 25.324 kb approximately
    Max memory usage after hash (500.000 records) 84.352 kb approximately
    Memory released: 0 %
    1.2 max memory usages after 2nd consequtive hash usage 81.616 kb approximately
    "observation:
    - memory is released then reused
    - less max memory consumed"
    1.3 max memory usages after 3rd consequtive hash usage 80.000 kb approximately
    "observation:
    - memory is released then reused
    - less max memory consumed"
    1.4 Running the dictionary procedure after any of the hash runs will start from the already allocated memory
    In this case from 80000 kb to 147000 kb
    Close excel, free up memory and restart excel
    2.1 Excel starting memory: 25.324 kb approximately
    Max memory usage after dict (500.000 records) 90.000 kb approximately
    Memory released: 91,9%
    2.2 Excel starting memory 2nd consequtive dict run: 27.552 kb approximately
    Max memory usage after dict (500.000 records) 90.000 kb approximately
    Memory released: 99,4%
    2.3 Excel starting memory 3rd consequtive dict run: 27.712 kb approximately
    Max memory usage after dict (500.000 records) 90.000 kb approximately
    Memory released:

    Hi Cor,
    Thank you for going through my post and took the time to reply :) Most apreciated. The issue I am facing is that the memory is not reallocated when using mixed object types and is not behaving the same. I not understand that .net versus the older methods
    use memory allocation differently and perhaps using the .net dictionary object (in stead of the scripting.dictionary) may lead to similar behaviour. {Curious to find that out -> put to the to do list of interesting thingies to explore}
    I agree that allocated memory is not a bad thing as the blocks are already assigned to the program and therefore should be reallocated with more performance. However the dictionary object versus hashtable perform almost identical (and sometimes even favor
    the dictionary object)
    The hashtable is clearly the winner when dealing with small sets of data.
    The issue arises when I am using the hash table in conjunction with another type, for example a dictionary, I see that the dictionary object's memory is stacked on top of the claimed memory space of the hashtable. It appears that .net memory allocation and
    reuse is for .net references only. :) (Or so it seems)
    In another example I got with the similar setup, I see that the total used memory is never released or reclaimed and leakage of around 20% allocated memory remains to eventually crash the system with the out of memory message. (This is when another class
    calls the parent class that instantiates the child class but thats not the point of the question at hand)
    This leakage drove me to investigate and create the example of this post in the first place. For the solution with the class -> parent class -> child class memory leak I switched all to dictionaries and no leakage occurs anymore but nevertheless thought
    it may be good to share / ask if anyone else knows more :D (Never to old to learn something new)

  • Set Time Interval with custom fields in generic list with view(SPViewCollection.SPViewType.Calendar)

    I need to set time interval range with custom date fields in sharepoint view SPViewCollection.SPViewType.Calendar. How to do that?
    My code is this:
    System.Collections.Specialized.StringCollection viewFields = new System.Collections.Specialized.StringCollection();
    viewFields.Add("FechaInicio");
    viewFields.Add("FechaFin");
    string query = @"<Query>
    <Where>
    <DateRangesOverlap>
    <FieldRef Name=""FechaInicio"" />
    <FieldRef Name=""FechaFin"" />
    <FieldRef Name=""RecurrenceID"" />
    <Value Type=""DateTime"">
    <Week />
    </Value>
    </DateRangesOverlap>
    </Where>
    </Query>";
    SPView newView = reserva.Views.Add("CalendarView", viewFields, query, 0, true, true, SPViewCollection.SPViewType.Calendar, false);
    "FechaInicio" and "FechaFinal" ara datetime fields in my generic list.
    Thanks.

    Hi,
    According to your post, my understanding is that you want to see the calendar view begin and end time for the time interval.
    We can use the SharePoint Manager to view the internal name for the begin and end time for the time interval.
    Open SharePoint Manager 2013->click your site->click
    Lists->select your list name->click Views->select your calendar view name->click the
    Schema Xml to check the internal name for the time interval begin and end.
    We can download the SharePoint Manager in here:
    http://spm.codeplex.com/
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Generic Extraction business Requirement, through function module,

    Generic Extraction business Requirement, specifically through function module and source code in function module.

    Dear Karthik,
    Go to transaction SBIW -> Generic Datasource -> Maintain Generic Datasources -> Choose Master/Transaction Data -> Maintain proper entries (Application Component, Descriptions) -> Extraction by FM if you want to extract using FM.
    Maintaining Generic DataSources - Independently of application, you can create and maintain generic DataSources for transaction data, master data attributes or texts from any kinds of transparent tables, database views, InfoSets of the SAP query or using a function module. As a result, you can make use of the generic extraction of data.
    Creating a Generic DataSource
           1.      Select the DataSource type and give it a technical name.
           2.      Choose Create. The creating a generic DataSource screen appears.
           3.      Choose an application component to which the DataSource is to be assigned.
           4.      Enter the descriptive texts. You can choose any text.
           5.      Choose from which datasets the generic DataSource is to be filled.
                                a.      Choose Extraction from View, if you want to extract data from a transparent table or a database view. Enter the name of the table or the database view.
    After generation, you get a DataSource whose extract structure is congruent with the database view or the transparent table view.
    For more information about creating and maintaining database views and tables, see the ABAP Dictionary Documentation.
                                b.      Choose Extraction from Query, if you want to use a SAP query InfoSet as the data source. Select the required InfoSet from the InfoSet catalog.
    After generation, you now have a DataSource whose extract structure matches the InfoSet.
    For more information about maintaining the InfoSet, see the System Administration documentation.
                                c.      Choose Extraction using FM, if you want to extract data using a function module. Enter the function module and extract structure.
    The data must be transferred by the function module in an interface table E_T_DATA.
    For information about the function library, see the ABAP Workbench: Tools documentation.
                                d.      With texts, you also have the option of extraction from domain fixed values.
    Maintain the settings for delta transfer where appropriate.
           7.      Choose Save.
    Note when extracting from a transparent table or view:
    If the extract structure contains a key figure field, that references to a unit of measure or currency unit field, this unit field must appear in the same extract structure as the key figure field.
    A screen appears in which you can edit the fields of the extract structure.
           8.      Editing the DataSource:
           Selection
    When scheduling a data  request in the BW Scheduler, you can enter the selection criteria for the data transfer. For example, you may want to determine that data requests are only to apply to data from the previous month.
    If you set the Selection indicator for a field within the extract structure, the data for this field is transferred in correspondence with the selection criteria in the scheduler.
           Hide field
    You should set this indicator to exclude an extract structure field from the data transfer. As a result of your action, the field is no longer made available in BW when setting the transfer rules and generating the transfer structure.
           Inversion
    Reverse postings are possible for customer-defined key figures. For this reason, inversion is only possible for certain transaction data DataSources. These include DataSources that have a field that is indicated as an inversion field, for example, the field update mode in the DataSource 0FI_AP_3. If this field has a value, then the data records are interpreted as reverse records in BW.
    Set the Inversion indicator if you want to carry out a reverse posting for a customer-defined field (key figure). The value of the key figure is then transferred in inverted form (multiplied by –1) into BW.
           Field only known in exit
    You can enhance data by extending the extract structure for a DataSource using fields in append structures.
    The indicator Field only known in Exit is set for fields of an append structure. In other words, by default these fields are not passed onto the extractor from the field list and selection table.
    Deselect the indicator Field Only Known in Exit to enable the Service API to pass on the append structure field to the extractor together with the fields of the delivered extract structures in the field list as well as in the selection table.
    9. Choose DataSource -> Generate.
    The DataSource is now saved in the source system.
    Maintaining Generic DataSources
    ·        Change the DataSource
    To change a generic DataSource, in the initial screen of DataSource maintenance, enter the name of the DataSource and choose Change.
    You can change the assignment of a DataSource to an application component as well as the texts of a DataSource. Double-clicking on the name of the table, view, InfoSet or extract structure takes you to the appropriate maintenance screen. Here you can make changes required to add new fields. You can fully swap transparent tables and database views, but not InfoSets. If you return to the DataSource maintenance and choose Create, the screen for editing a DataSource appears. To save the DataSource in the SAP source system, choose DataSource  -> Generate.
    If you want to test extraction in the source system independently of a BW system, choose DataSource  ->  Test Extraction.
    ·        Delta DataSource
    In the Change Generic DataSource screen, you can delete any DataSources that are no longer relevant. If you are extracting data from an InfoSet, delete the associated query. If you want to delete a DataSource, this must not be connected to a BW system.
    Also visit :[Data Extraction from SAP Source System | http://help.sap.com/saphelp_nw04/helpdata/en/28/4c553c42360a40e10000000a114084/content.htm]
    Regards,
    Naveen.

  • Processed TRs to be deleted from LB10(display TRs list for a storage type)

    Dear all
    Is it possible to delete already processed transfer requirements for a storage type in Transaction LB10?
    Please guide me

    Use LB02 as below:
    Choose Logistics ® Logistics Execution ® Internal Warehouse Processes ® Transfer Requirement ® Change from the SAP menu.
    Enter the warehouse number and the transfer requirement number. You can also enter the number of the item you want to delete.
    From the initial screen, you have several options.
    - To delete a transfer requirement, access the header screen by selecting Header. Then choose   Transfer Requirement  ® Delete from the Change Header menu bar.
    - To delete one or more transfer requirement items, choose List of changes to access the screen where all the items are listed.
    Choose Enter.
    The system displays a list of all transfer requirement items.
    - Select the items that you want to delete in the D column. To delete the items, choose Enter.
    - You can also access a list of all transfer requirement items by choosing   Item overview. Select the item to be deleted (for example, by moving the cursor to the item) from the list and choose Edit  ® Delete item from the menu bar.
    Regardless of the option you have chosen, the system displays a confirmation window.
    To confirm the deletion, choose Yes.
    If you have selected several items, the system displays a confirmation window for each item.
    If the item is the only one in the transfer requirement, the system displays another window in which you confirm that you want to delete the transfer requirement

  • Generic method invocations with explicit type parameters

    If I interpret the JSR14 public draft spec (June 23, 2003) section 5.6 correctly the following method invocations with explicit type parameters should compile: package generics;
    public class G121 {
      void f() {
        this.<String>f2();
        <String>f2(); // compilation error
        <String>f3(); // compilation error
      <T> void f2() {
      static <T> void f3() {
    }but the class does not compile: jc -J-showversion generics\G121.javajava version "1.5.0-beta"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
    Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
    generics\G121.java:6: illegal start of expression
        <String>f2(); // compilation error
                ^
    generics\G121.java:8: illegal start of expression
        <String>f3(); // compilation error
                ^
    2 errors
    >A bug or do I miss something?

    I get this error:
    LineCount.java:104: cannot find symbol
    symbol : method <java.io.File>sort(java.util.List<java.io.File>)
    location: class java.util.Collections
    Collections.<File>sort( list );
    ^
    1 errorYou don't need the explicit type argument there, but anyway...
    If you look at the docs for Collections.sort(List<T> list) you'll see it is declared as:
    static <T extends Comparable<? super T>> void Collections.sort(List<T> list) Unfortunately, although File implements Comparable, it doesn't actually implement Comparable<File> or even Comparable<Object>, so I guess it can't satisfy the bound.
    You can get it to compile by removing the explicit type argument and casting to the raw type List, but that's not very nice.
    This seems like an oversight to me - File already has both int compareTo(Object o) and int compareTo(File pathname) so I don't see why it can't implement Comparable<File>. This isn't the only such case in the API though, so maybe I'm missing something.
    Mark

  • How do I set numbered lists for headings in Pages 5.2, and keep that system of numbered lists saved?

    I have tried to set numbered lists for headings in Pages 5.2 but have not succeeded. I have read similar questions concerning this but this has not helped me...
    When I say numbered lists I mean something extremely important and simple, for instance:
    1. Introduction
    1.1. Background
    1.2. Purpose and Questions
    2. The Legality of Clause X
    2.1. Legality under Article 101.1
    2.2. Legality under Article 101.3
    And so on...
    Heading 1. is selected as "Heading", 1.1 is selected as "Heading 2", and if I had 1.1.1 it would be selected as "Heading 3" and so on...
    I have navigated my way to the Format window, and under the tab "Style" and down to "Bullets & Lists". I have here selected the following: Numbered, Numbers, 1. 2. 3. 4., Tiered Numbers, Continue from previous.
    There are several problems with this currently.
    First, based on the example it becomes "2. Background" when it should be "1.1 Background" instead.
    Second, after writing some body text between the headings and then select a new heading, all the previously selected settings I mentioned above in "Bullets & Lists" have to be reselected.
    So, how do I set numbered lists for headings, or so called sub-headings, in Pages 5.2? And how do I keep that selected system of numbered lists saved so I don't have to retype it for every new heading I type? (e.g. so that Pages knows that every time I choose Heading 2, I want it to number the heading in the way selected)
    Obviously, manually writing the numbers for every heading is not a viable option, as it makes table of contents problematic and is simply tedious. You need an automatic way of doing it, especially if you write long documents where keeping headings in order is absolutely essential.
    Also, reverting back to previous Pages versions (like v. 9 I think?) is not an option as that does not exist on my recently purchased Macbook Pro.
    I need to be able to do this on Pages 5.2 and do it automatically.
    I appreciate any help with this.

    iWork '09 is not "outdated" it still works and works extremely well and whilst not perfect with MsWord it is far far better than Pages 5.2 which has a stream of major issues with exporting. It is also way better and faster to use than Microsoft Office.
    So what is your time and work actually worth? If it is less than $19.99 for 6 months, you may as well just chuck it in and take that job on minimum wages.
    You are assuming things for Office 2014 with absolutely no inside knowledge. Much as we assumed Pages 5 was going to be the long awaited improvement, but ended up being a downgrade to match the iOS version, Microsoft is headed the same way with their mobile versions.
    This is not like getting the "latest" pair of pants where you go with the crowd and throw out your cigarette legs which replaced the flares, which replaced your low cuts which replaced your cigarette legs, which replaced…
    This is work.
    If it does the job and does it well, use it. There is nothing out there to really match what Pages '09 does. Yet.
    LibreOffice can do most but not all, but has a UI that only a mother could love. It's great redemption is that it uses both open formats and the standard Microsoft formats and is under active development. It also opens and saves to just about everything. When they finally work out the Pages formats, I'm sure they will open those as well.
    I use a lot of professional software. Just because the publisher's marketing department says change the product so we can sell more, doesn't mean you have to pay any attention whatsoever. Adobe being a classical example. Most designers are just ignoring their latest subscription based bloatware and getting on with their work.
    Peter

  • I don't have pdf documents listed as a file type in the applications drop down menu so I cannot manage the handling of these file types. How do I get the pdf file recognised?

    I don't have pdf documents listed as a file type in the drop down applications menu, so cannot handle these. How do I add a file type?

    After a little Googling, it looks like B.Media is a content management system from Wave Corporation used for making catalogs. Doubtful you'd be able to license it at less than an enterprise level.

  • Custom Ribbon tab does not show in generic list

    Hi.
    I'm deploying the following definiton on a generic list, but the new custom tab does not show up. Anyone that can see what I have done wrong?
    Thanks!
    <Elements xmlns=”http://schemas.microsoft.com/sharepoint/“>
    <CustomAction
    Id=”Ribbon.MyTab”
    Title=”Adds a new Ribbon tab to Generic List”
    RegistrationType=”List”
    RegistrationId=”100″
    Location=”CommandUI.Ribbon.ListView”
    >
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition
    Location=”Ribbon.Tabs._children”>
    <Tab Id=”Ribbon.MyTab” Sequence=”110″ Description=”" Title=”My Tab Name”>
    <Scaling Id=”Ribbon.MyTab.Scaling”>
    <MaxSize
    Id=”Ribbon.MyTab.Scaling.MyGroup.MaxSize”
    Sequence=”15″
    GroupId=”Ribbon.MyTab.MyGroup”
    Size=”LargeMedium”/>
    </Scaling>
    <Groups Id=”Ribbon.MyTab.Groups”>
    <Group
    Id=”Ribbon.MyTab.MyGroup”
    Sequence=”15″
    Description=”"
    Title=”My Group Name”
    Template=”Ribbon.Templates.MyTab.MyGroup.CustomTemplate”>
    <Controls Id=”Ribbon.MyTab.MyGroup.Controls”>
    <Button
    Id=”Ribbon.MyTab.MyGroup.Button”
    Alt=”Ribbon.MyTab.MyGroup.Button”
    Command=”Ribbon.MyTab.MyGroup.Button_CMD”
    Image16by16=”/_layouts/images/siteIcon.png”
    Image32by32=”/_layouts/images/siteIcon.png”
    LabelText=”Button”
    Sequence=”10″
    TemplateAlias=”o1″
    ToolTipTitle=”Button”
    ToolTipDescription=”Shows a dialog” />
    </Controls>
    </Group>
    </Groups>
    </Tab>
    </CommandUIDefinition>
    <CommandUIDefinition
    Location=”Ribbon.Templates._children”>
    <GroupTemplate Id=”Ribbon.Templates.MyTab.MyGroup.CustomTemplate”>
    <Layout Title=”LargeMedium”>
    <OverflowSection Type=”OneRow” TemplateAlias=”o1″ DisplayMode=”Large”/>
    <OverflowSection Type=”ThreeRow” TemplateAlias=”o2″ DisplayMode=”Medium”/>
    </Layout>
    </GroupTemplate>
    </CommandUIDefinition>
    </CommandUIDefinitions>
    <CommandUIHandlers>
    <CommandUIHandler
    Command=”Ribbon.MyTab.MyGroup.Button_CMD”
    CommandAction=”javascript: alert('Hello World');” />
    </CommandUIHandlers>
    </CommandUIExtension>
    </CustomAction>
    </Elements>

    Hello,
    I was able to use your custom ribbon tab XML just fine.  The only thing is, the copy you provided had a bunch of illegal characters embedded in it (like reverse quotes?), I'm not sure if they're showing up in your version of the XML or not.  Anyway,
    after replacing those with straight quotes and fixing some other misc formatting, it worked fine.  I created an empty SharePoint project and added an empty element, then added your XML to the Element.xml file.  In SP, I created a new custom
    list and the "My Tab Name" tab appeared with a button that displayed "Hello World" when I clicked it. So, I recommend checking the formatting of your XML.  Just look for red squiggles in the editor and fix them.
    Regards,
    - Kemp Brown [MSFT]

Maybe you are looking for