Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have class with method return list of class .i cant implement interface
Please guide me

thnx

What I have tried:

C#
<pre>
using System;
using HtmlAgilityPack;
using System.Linq;
using System.Collections.Generic;

namespace Project1.CommonLayer.PublicClass
{

    public class SearchModel :ISearchModel
    {



        private string _resultread;
        public SearchModel(string _url)

        {
            _resultread = _url;

             readurl(_resultread);

        }





        public class _UrlList
        {
            public int UrlNumber { get; set; }
            public string UrlDesc { get; set; }
            public int LineNumber { get; set; }


        }


        public List<_UrlList>  readurl (string inputString)
        {


          Return list;



            }
Posted
Updated 21-Feb-21 9:32am
Comments
Kenneth Haugland 20-Feb-21 11:04am    
Where is your interface code? The ISearchModel?
mohamad_ali 28-Feb-21 8:14am    
thanks for your attention to my question , i solved it

1 solution

An interface can be a member of a namespace or a class. An interface declaration can contain declarations (signatures without any implementation) of the following members:

Methods
Properties
Indexers
Events

Yours isn't / aren't.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900