|
i need to learn Microsoft Dynamics Development with .net. Actually i don't have any knowledge on the technology and want to learn it. if any body has a know how of the technology then please suggest me some URLs, book, tutorial where from i can learn the technology.
sorry if i have posted question in a wrong forum.....
Regards
|
|
|
|
|
What are you looking to learn? CCA? UII? Workflows? You should probably get started with this[^] book.
|
|
|
|
|
Microsoft Website itself will be good starting point for you...
All the best.
|
|
|
|
|
The OP does not get notified of replies to posts replying to other people. You might want to send this one to the OP instead.
|
|
|
|
|
Hi,
I understand why a class may be static...
In a public class which is NOT static why would there be a static method?
i.e.
public class myCommon
{
public static string GetCurrentDirectory()
{
string path = null;
...
...
return path;
}
}
Thanks
|
|
|
|
|
The static method can be used to create an instance of a class, for instance. Alternatively, the static method does something that does not affect the state of the class so there is no need for it to be an instance method (in other words, all of the variables it uses are local).
|
|
|
|
|
So, what is the difference between the following codes please?
public class myCommon
{
public static string GetCurrentDirectory()
{
string path = null;
...
...
return path;
}
}
public static class myCommon
{
public static string GetCurrentDirectory()
{
string path = null;
...
...
return path;
}
}
|
|
|
|
|
the difference is removing "static" in public static string GetCurrentDirectory() will not/will cause a compiler error message.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
So,
1- A static class should have all it's methods as static.
2- A static class can be referred to without creating an instance of it.
3- If a class is NOT static and one or more of it's methods are static, then those static methods can be referred to without creating an instance but to refer to the non static methods, first, an instance of the class must be created.
Am I right please?
|
|
|
|
|
arkiboys wrote: A static class can be referred to without creating an instance of it
Obviously, as creating an instance is impossible.
arkiboys wrote: Am I right please?
If you're being lazy, you're not right. Read the reference material, study your C# book(s), and experiment. Don't just sit back and ask to be spoon fed.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
|
|
They're used for a number of things:
To limit the use (amount of instances) of the class, see also Singleton Pattern.
Implicit and explicit casting support (So you can type 'myCommon A = (myCommon)"Hey there";').
Operator overloading ( +, -, *, / are operators), see also here[^].
|
|
|
|
|
Some methods don't need an instance of the class, so they can be made static, and invoked with the class name. E.g.
myCommon.GetCurrentDirectory ();
This can occur when the method doesn't reference any instance variables, but is still related to the class' purpose. The class is used to group related methods.
|
|
|
|
|
|
To perform operations that aren't specific to an instance of a class. For example, assuming an Employee class that contains a Guid Id member, the Delete() method could have either (or both of these) signatures:
1
2 public void Delete()
3 {
4 Employee.Delete (this.Id);
5 }
6
7
8 public static void Delete
9 (Guid id)
10 {
11 ....
12 }
/ravi
|
|
|
|
|
I generally try to avoid static in classes for examples like this.
The example given implies there is some global collection of Employees to/fomm which employees can be added, deleted, etc.
Instead, I prefer to make the collection explicit, with some collection List<employees>, or an explicit implementation class like EmployeeList.
That way, its possible later to create multiple instances if needed, for example, it can improve testability massively too, as EmployeeList can be mocked.
In C#, I generally try to limit use of static to those methods the framework requires me too - operator overloading etc.
Even the use to construct values is suspect - instead use a factory object, implemented as a separate class, or a factory method on an existing class to create instances.
Gilad Bracha has written a good blog entry[^] that highlights many of the dangers of static much better than I could.
<edit>That talks mainly about static state - the following blog entry[^] discusses the issue in context of constructors, which are static methods.
|
|
|
|
|
Rob Grainger wrote: The example given implies there is some global collection of Employees to/fomm which employees can be added, deleted, etc.
Right. The example is typical of APIs one would encounter in a data access layer, where the store is a database.
/ravi
|
|
|
|
|
Hello,
I have a very simple problem but I don't now how to search about this on Google.
I have a url I don't know it is in Unicode or what I am pasting it please if any one help me regarding this.
&#1495;&#1489;&#1512;&#1493;&#1514;-&#1514;&#1497;&#1497;&#1512;&#1493;&#1514;
actually this is a part of url and I have to convert it to such coding to let my browser to understand it and I can use it.
Yes I know about HttpUtility.UrlDecode but as I told you earlier I don't know in which coding is my string, most when I paste my string in google and write that I want to decode it, google automatically convert it to original language, I want the same thing which google is doing but how?
Please help me out guys because I spend about 2 hours on this issue but no success.
Thanks in advance
|
|
|
|
|
I'm not sure quite what you are trying to do, but is it to display that string? Something like (I just threw this into a page of an MVC3 page to quickly test, but you can probably follow what I mean). It displays a Hebrew string - if that is what you are trying to do. But I may have interpreted you wrongly.
<p lang="he">@Html.Raw(@HttpUtility.HtmlDecode("&#1495;&#1489;&#1512;&#1493;&#1514;-&#1514;&#1497;&#1497;&#1512;&#1493;&#1514;"))</p><pre>
|
|
|
|
|
http://easy.co.il[^]Thanks for reply
No am not trying to display this string my page.
Let me explain it again.
Following (1) and (2) is example
I have an url :
(1)
<a href="http://easy.co.il/&#1495;&#1489;&#1512;&#1493;&#1514;-&#1514;&#1497;&#1497;&#1512;&#1493;&#1514;/">http://easy.co.il/&#1495;&#1489;&#1512;&#1493;&#1514;-&#1514;&#1497;&#1497;&#1512;&#1493;&#1514;/</a>[<a href="http://easy.co.il/&#1495;&#1489;&#1512;&#1493;&#1514;-&#1514;&#1497;&#1497;&#1512;&#1493;&#1514;/" target="_blank" title="New Window">^</a>]
I want to convert it to
(2) <a href="http://easy.co.il/%D7%97%D7%91%D7%A8%D7%95%D7%AA-%D7%AA%D7%99%D7%99%D7%A8%D7%95%D7%AA/">http://easy.co.il/%D7%97%D7%91%D7%A8%D7%95%D7%AA-%D7%AA%D7%99%D7%99%D7%A8%D7%95%D7%AA/</a>[<a href="http://easy.co.il/%D7%97%D7%91%D7%A8%D7%95%D7%AA-%D7%AA%D7%99%D7%99%D7%A8%D7%95%D7%AA/" target="_blank" title="New Window">^</a>]
As you can see (1) if I past it in browser it is not working and (2) is working fine.
So now I have a lot of urls like (1) and I have to convert them in to (2).
Please help me how I will do this conversion.
|
|
|
|
|
Please help me out , I am not able to solve this problem.
|
|
|
|
|
Hi,
I wrote a little decoder for it:
string s1="this is to be the input string, however the CP message editor page does not like Unicode";
string s2="";
for (int i=0; i<s1.Length; i++) {
if (s1[i]=='&') {
int n=0;
for (int j=6; j<10; j++) {
char c=s1[i+j];
int k="0123456789".IndexOf(c);
n=10*n+k;
}
s2+=(char)n;
i+=10;
} else {
s2+=s1[i];
}
}
log("s1="+s1);
log("s2="+s2);
It turns your specially encoded string into a regular Unicode string, which browsers seem to accept well.
Warning: there isn't any error checking as it is, you may want to improve on that. All I did is assume that every ampersand is the start of a 10-character sequence holding a 4-digit decimal number, which really should be checked.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
and this is a lot safer already:
string s1="the input string";
s1=HttpUtility.HtmlDecode(s1);
string s2="";
for (int i=0; i<s1.Length; i++) {
if (s1[i]=='&' && s1[i+1]=='#') {
i+=2;
int n=0;
for (; ; ) {
char c=s1[i++];
int k="0123456789".IndexOf(c);
if (k<0) break;
n=10*n+k;
}
s2+=(char)n;
i--;
} else {
s2+=s1[i];
}
}
log("s1="+s1);
log("s2="+s2);
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
modified on Wednesday, April 6, 2011 6:30 AM
|
|
|
|
|
thank you very much, It really help me out.
Thanks again.
|
|
|
|