I'm working in List and storing my data in class and again using new list to differentiate between receive data.
I'm using startswith function to check for data inside a string. But i also want to call startswith function inside loop with string is data form class. I can't add startwith because my class don't have definition for this function
Below is demo code help you understand what i'm asking
class URLClass
{
public URLClass()
{
}
//packet count
private int pktCount;
public int PktCount
{
get { return pktCount; }
set { pktCount = value; }
}
//URL accessed
private string uRLString;
public string URLString
{
get { return uRLString; }
set { uRLString = value; }
}}
This is a class data... I used a list for class data and name it URLData
Below code is the loop
foreach (var x in URLData) //URLData is list from above class
{
if (x.StartsWith("SomeText")) // Here i face problem my class don't have any definition of Sartswith function is there any way i can define it manually
}