Search Results

Search found 42 results on 2 pages for 'itayb'.

Page 2/2 | < Previous Page | 1 2 

  • Removing specific XML tags

    - by iTayb
    I'd like to make an application that removes duplicates from my wpl (Windows PlayList) files. The wpl struct is something like this: <?wpl version="1.0"?> <smil> <head> <meta name="Generator" content="Microsoft Windows Media Player -- 11.0.5721.5145"/> <meta name="AverageRating" content="55"/> <meta name="TotalDuration" content="229844"/> <meta name="ItemCount" content="978"/> <author/> <title>english</title> </head> <body> <seq> <media src="D:\Anime con 2006\Shits\30 Seconds to Mars - 30 Seconds to Mars\30 Seconds to Mars - Capricorn.mp3" tid="{BCC6E6B9-D0F3-449C-91A9-C6EEBD92FFAE}" cid="{D38701EF-1764-4331-A332-50B5CA690104}"/> <media src="E:\emule.incoming\Ke$ha - Coming Unglued.mp3" tid="{E2DB18E5-0449-4FE3-BA09-9DDE18B523B1}"/> <media src="E:\emule.incoming\Lady Gaga - Bad Romance.mp3" tid="{274BD12B-5E79-4165-9314-00DB045D4CD8}"/> <media src="E:\emule.incoming\David Guetta -Sexy Bitch Feat. Akon.mp3" tid="{46DA1363-3DFB-4030-A7A9-88E13DF30677}"/> </seq> </body> </smil> This looks like standard XML file. How can I load the file and get the src value of each media tag? How can I remove specific media, in case of duplicates? Thank you very much.

    Read the article

  • How to let users edit list<T> content?

    - by iTayb
    I'm making an aspx page that can edit books. A book is an complex class with lots of properties. I've made an edit page for most of them, however I'm having trouble with showing edit options for my Sellers Proprety. It is an list<Seller> object. Seller is as follows: public class Seller { private string sellerName; private double price; } How can I print a list to the screen, and let the clinet edit it, then load it back to the object? Thank you very much.

    Read the article

  • How to overwrite specific lines on text files

    - by iTayb
    I have two text files. I'd like to copy a specific part in the first text file and replace it with a part of the second text file. This is how I read the files: List<string> PrevEp = File.ReadAllLines(string.Format(@"{0}naruto{1}.ass", url, PrevEpNum)).ToList(); List<string> Ep = File.ReadAllLines(string.Format(@"{0}naruto{1}.ass", url, EpNum)).ToList(); The part in PrevEp that I need: from the start until it meets a line that includes Creditw,,0000,0000,0000. The part I would like to overwrite in Ep: from the start to a line which is exactly Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text. I'm not so sure how may I do it. Could you lend me a hand? Thank you very much, gentlemen.

    Read the article

  • How can I get a string[] of all different values of a list?

    - by iTayb
    I have a class that has an list<Book> in it, and those Book objects has many many properties. string Subject is one of those properties. I'd like to get an string[] type value that will include all different subjects from all over the list. Is there an elegant way to do it, or I'll have to scan the whole list and enter each subject to it, then remove duplicates?

    Read the article

  • Confused about "override" vs. "new" in C#

    - by iTayb
    I'm having the following classes: class Base { public virtual void Print() { Console.WriteLine("Base"); } } class Der1 : Base { public new virtual void Print() { Console.WriteLine("Der1"); } } class Der2 : Der1 { public override void Print() { Console.WriteLine("Der2"); } } This is my main method: Base b = new Der2(); Der1 d1 = new Der2(); Der2 d2 = new Der2(); b.Print(); d1.Print(); d2.Print(); The output is Base, Der2, Der2. As far as I know, Override won't let previous method to run, even if the pointer is pointing to them. So the first line should output Der2 as well. However Base came out. How is it possible? How the override didn't work there?

    Read the article

  • Get the maximum value out of an complex class

    - by iTayb
    I have the following class: class Seller { private string sellerName; private decimal price; } ~propreties for SellerName and Price goes here~ I also have a list of sellers: list<Seller> s = new list<Seller>(); How can I get the maximum value of price out of all the sellers? Thank you very much.

    Read the article

  • How can I save objects as XML files

    - by iTayb
    I'm working on my high-school matriculation asp.net project, and I wish to make a website of a bookstore. I want to create two classes,Book and BookStore, and save the data created in XML files and not in a database. How can I save objects as XML files, and how can I load them afterwards? Thank you very much.

    Read the article

  • Is base method able to use derived base data members?

    - by iTayb
    Lets assume we have the following code: abstract class Base1 { protected int num; } class Der1:Base1 { protected Color color; protected string name; } class Der2:Base1 { protected DateTime dthen; } and so on. An array of base1 type exists and includes many objects created out of classes that are derived from base1. Is it possible to define the toString() method in the base class only? something like: public override string toString() { if (this is Der1) return "num = " + this.num + "color = " + this.color.toString() + " name = " this.name; if (this is Der2) return "num = " + this.num + "dthen = " + this.dthen.toString(); // and so on ... } Thank you very much :) P.S. This is not an homework question. I've just wondered about.

    Read the article

  • Casting complex class into a dataset?

    - by iTayb
    This is the class I'm trying to turn into a dataset: public class BookStore { private List<Book> booksList; } public class Book { private string name; private string imageurl; private string subject; private string author; private int level; private int year; private int rating; private List<string> booksellers; private List<decimal> bookprices; } There are proprieties, of course. How can I turn it into a dataset? Thank you very much.

    Read the article

< Previous Page | 1 2