Search Results

Search found 3 results on 1 pages for 'yellowblood'.

Page 1/1 | 1 

  • C# Lack of Static Inheritance - What Should I Do?

    - by yellowblood
    Alright, so as you probably know, static inheritance is impossible in C#. I understand that, however I'm stuck with the development of my program. I will try to make it as simple as possible. Lets say our code needs to manage objects that are presenting aircrafts in some airport. The requirements are as follows: There are members and methods that are shared for all aircrafts There are many types of aircrafts, each type may have its own extra methods and members. There can be many instances for each aircraft type. Every aircraft type must have a friendly name for this type, and more details about this type. For example a class named F16 will have a static member FriendlyName with the value of "Lockheed Martin F-16 Fighting Falcon". Other programmers should be able to add more aircrafts, although they must be enforced to create the same static details about the types of the aircrafts. In some GUI, there should be a way to let the user see the list of available types (with the details such as FriendlyName) and add or remove instances of the aircrafts, saved, lets say, to some XML file. So, basically, if I could enforce inherited classes to implement static members and methods, I would enforce the aircraft types to have static members such as FriendlyName. Sadly I cannot do that. So, what would be the best design for this scenario?

    Read the article

  • SharePoint's CAML query the "Created By" field with username

    - by yellowblood
    Hey, I have a form for administrators where they insert a user name ("domain\name") and the code gets and sets some information out of it. It's a huge project and some of the lists contain the username as a string ("domain\name"), but some lists only count on the "Created By" column, which is auto-created. I want to know what's the fastest way to query these lists using the username string. I tried to use the same query as the one I use for the first kind of lists and it obviously didn't work - <Where><Eq><FieldRef Name='UserName'/><Value Type='Text'>domain\\username</Value></Eq></Where> Thank you.

    Read the article

  • SharePoint Documents Library - Change "Document Created By" field

    - by yellowblood
    Hello, I have a code that changes the username in various SharePoint lists, mostly by the "Author" column. It all works fine on normal lists, but it doesn't seem to work on the "Shared Documents" list which is a document library. Whether I change the username in "Created By" or "Document Created By", the change doesn't seem to take effect. The item.Update command doesn't throw any exception, but it clearly doesn't update the field(s). What can I do if I want to change this field through code? Thanks

    Read the article

1