Register for your free account! | Forgot your password?

You last visited: Today at 04:07

  • Please register to post and access all features, it's quick, easy and FREE!

 

fb ss

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
fb ss

WTF?
Code:
Error	1	Extension methods must be defined in a non-generic static class	C:\Users\LoveYouAll.JOKE\Desktop\TheSource\HellCo\MyMath.cs	20	18	HellCo
annoying.

this is the things giving error:
Code:
public class MyMath
and when i change to static.
Line stops work, then if i change that to static, then 1million errors come up.
WTF?
i tried to solve it alot now
btw. I get the same error 2 times xD

(Arcos fb/ss fix)



.Summer is offline  
Old   #2
 
elite*gold: 0
Join Date: Dec 2005
Posts: 231
Received Thanks: 85
static basically means non changeable. So for example, foo is a static method of class Database. You can only do Database.foo(); However if you don't have static, you cant use it on an object. So for example you have:

Code:
public static void foo() {}
public void bar(){}
Code:
Database Blah = new Database(); 
Blah.bar();
that will work but if you went

Code:
Database Blah = new Database(); 
Blah.foo();
that will generate an error. Point is, make sure that you referenced static and non static correctly


dragon89928 is offline  
Old   #3
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
I followed the guide from arco.
And this came up after.
Is wierd XD

and know about what it is.
I already tried change it to static. and change to non.
but nothing worked.
.Summer is offline  
Old   #4
 
elite*gold: 0
Join Date: Dec 2005
Posts: 231
Received Thanks: 85
tbh, its really hard to figure out what's wrong with your fb/ss cuz we can't see the code. But just double check (not guess and check) that your methods are indeed static if they should be static.


dragon89928 is offline  
Old   #5
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
I did everything in arcos thread.
And i havent changed anything in them before
but I will try again.
Ill let u know if works
.Summer is offline  
Old   #6
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,740
Received Thanks: 5,268
You placed something in teh wrong spot.
A lot got that error.
Arcо is offline  
Old   #7
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
Arco.
Now this error after doing it again.
Code:
Error	1	Embedded statement cannot be a declaration or labeled statement	C:\Users\LoveYouAll.JOKE\Desktop\TheSource\HellCo\Features\Skills.cs	255	27	HellCo
.Summer is offline  
Old   #8
 
elite*gold: 0
Join Date: Oct 2009
Posts: 128
Received Thanks: 49
Quote:
Originally Posted by dragon89928 View Post
static basically means non changeable.
No it doesn't. The sealed keyword refers to classes or methods that are immutable, or can't be extended or overridden. The static keyword refers to any members that are stateless to specific objects of a type, but belong to the type itself. The const keyword (applied to a field declaration) declares a class constant, and is also stateless to specific objects.
s.bat is offline  
Old   #9
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
FIXED!!!!
.Summer is offline  
Old   #10
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,740
Received Thanks: 5,268
So exactly what was the problem?
Arcо is offline  
Old   #11
 
elite*gold: 0
Join Date: May 2010
Posts: 630
Received Thanks: 130
No idea.
I did it all again and worked. o.O

#thanks to US
.Summer is offline  
Old   #12
 
elite*gold: 0
Join Date: Dec 2005
Posts: 231
Received Thanks: 85
Quote:
Originally Posted by s.bat View Post
No it doesn't. The sealed keyword refers to classes or methods that are immutable, or can't be extended or overridden. The static keyword refers to any members that are stateless to specific objects of a type, but belong to the type itself. The const keyword (applied to a field declaration) declares a class constant, and is also stateless to specific objects.
last I checked immutable has the same meaning as non changeable. I also said "basically".

dragon89928 is offline  
Old   #13
 
elite*gold: 0
Join Date: Oct 2009
Posts: 128
Received Thanks: 49
Quote:
Originally Posted by dragon89928 View Post
last I checked immutable has the same meaning as non changeable. I also said "basically".

Re-read what I wrote more carefully. I was referring to the sealed keyword when I talked about immutability because that is what you said static does (and it does not).


s.bat is offline  
Reply



« Previous Thread | Next Thread »



All times are GMT +1. The time now is 04:07.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.