revaignaneise
New Member
I have some code that is behaving like my variables are being passed by reference when I don't think they should be. In a class library I have \[code\]public class ListingHelper{ public static List<FilterCategory> getListingFilterCertifications(ListingCategory parentListingCategory, ListingFilters filters) { ...//Building up return object filters.gradingServiceId = 2; }}\[/code\]In the pageLoad of a page I call this: \[code\]private void BindForm(){ ListingFilters filters = new ListingFilters(); filters.gradingServiceId = 0; if (filters.gradingServiceId > 0) { listCertification.DataSource = ListingHelper.getListingFilterCertificationById(filters.gradingServiceId); listCertification.DataBind(); }}\[/code\]I thought that \[code\]filters.gradingServiceId\[/code\] should be 0 when I get back from calling my method in the library, but it's coming back as 2. Are methods parameters to static methods really passed by reference?